我们以index.html文件为例

[root@server06 ~]# cat index.html  #输出index.html文件内容
server 06
server 06 aaa ccc ddd

正常情况下取第一列的结果明如下:

[root@server06 ~]# awk '{print $1}' index.html 
server
server

如果想要取出第一列以外的其它内容命令如下:

[root@server06 ~]# awk '{$1="";print }' index.html 
 06
 06 aaa ccc ddd

如果想要取出第N列和M列以外的其它内容命令如下:

[root@server06 ~]# awk '{$1=$3="" ;print }' index.html  #假设m=1,n=3,以此类推
 06 
 06  ccc ddd