# df |awk '$2 < 1028736'
none 1019276 240 1019036 1% /dev
模式 { 操作语句1; 操作语句2; ...; }
模式 {
操作语句1
操作语句2
...
}
abc www 3201 3/13/11 30138
def gro 3033 2/32/13 02901
xyz dai 3010 8/81/11 10391
opq lio 8901 7/18/38 31899
# awk '/xyz/{print "Hello ", $1; print "Your number is ", $5}' temp.txt Hello xyz
Your number is 10391
# awk '/xyz/{print "Hello $1"; print "Your number is "$5""}' temp.txt
Hello $1
Your number is 10391
you
should
focus
your
attention
on
your
work
# awk '/should/,/your/' test
should
focus
your
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |