User Tools

Site Tools


awk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
awk [2014/08/01 04:23] – created pawlukawk [2014/08/05 18:10] (current) pawluk
Line 1: Line 1:
 +====== Sample AWK questions ======
 +
   * How to run awk command specified in a file?   * How to run awk command specified in a file?
 ''awk -f filename'' ''awk -f filename''
Line 19: Line 21:
  
   * Write a command to print zero byte size files?   * Write a command to print zero byte size files?
-''ls -l | awk '/^-/ {if ($5 !=0 ) print $9 }'''+''ls -l | awk '/^-/ {if ($5==0 ) print $9 }'''
  
   * Write a command to rename the files in a directory with "_new" as postfix?   * Write a command to rename the files in a directory with "_new" as postfix?
awk.1406866993.txt.gz · Last modified: 2014/08/01 04:23 by pawluk

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki