测试文件names Tom Savage 100 Molly Lee 200 John Doe 300 $0 代表file的整行; $1,第一列;$2,第二列...... $ awk '/Tom/{print $0}' names $ Tom Savage 100 演示样例二: $ awk '{print $1,$3}' names $ Tom 100 $ Molly 200 $ John 300 The test files employees and awkfile as followin…