您好我想通过命令将每个行计数提取到一个文件。
4495125 94307025 [email protected] 94307025.094307025 12443
stazla [email protected] 1992/.:\1
1447585 [email protected] h1st@1
saknit [email protected] 1233 1990
_______________________________________________________
5column.txt
4495125 94307025 [email protected] 94307025.094307025 12443
_______________________________________________________
4column.txt
saknit [email protected] 1233 1990
_______________________________________________________
3column.txt
stazla [email protected] 1992/.:\1
1447585 [email protected] h1st@1
我需要代码才能完成这项工作!
以下awk
可以帮助你。
awk '{print > NF"column.txt"}' Input_file
输出它将创建3个名为5column.txt
,4column.txt
和3column.txt
的文件。