Awk-examples

From PTAGISWiki

Jump to: navigation, search

ls -l | awk '{ print $1 }' # prints first field ls -l | awk '{ print $NF }' # prints last field

  1. deletes the matched text from each line

nawk '{ sub/cvs.*warning:/, "") ; print }'

Personal tools