awk或sed单独提取每个列数 [英] awk or sed extract each number of column alone

查看:172
本文介绍了awk或sed单独提取每个列数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想通过命令将每个行数提取到文件中.

Hello i want to extract each line count to a file by command.

4495125 94307025    giovy115p@live.it   94307025.094307025  12443
stazla  deva1a23@gmail.com  1992/.:\1
1447585 gioao_87@hotmail.it h1st@1
saknit  tomboro@seznam.cz   1233    1990
_______________________________________________________
5column.txt
4495125 94307025    giovy115p@live.it   94307025.094307025  12443
_______________________________________________________
4column.txt 
saknit  tomboro@seznam.cz   1233    1990
_______________________________________________________
3column.txt 
stazla  deva1a23@gmail.com  1992/.:\1
1447585 gioao_87@hotmail.it h1st@1

我需要代码来完成这项工作!!

i need code to do this job please!!

推荐答案

跟随awk可以帮助您.

awk '{print > NF"column.txt"}'  Input_file

输出它将创建3个名为5column.txt4column.txt3column.txt的文件.

Output it will create 3 files named 5column.txt, 4column.txt and 3column.txt.

这篇关于awk或sed单独提取每个列数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆