001、
[root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 aa bb ee 33 ff rr aa ff yy [root@PC1 test1]# awk 'NR == 2 {printf("%s\t%d\n", $2, 100)}' a.txt ## 前者输出字符串;后者输出数值 ff 100
。