changing the output filenames in [split] [closed]

纵饮孤独 提交于 2021-02-16 16:40:09

问题


I would like to split a huge text file into separate text files. I use:

split -l 1000 file.txt split_file

and I will get split_fileaa, split_filebb, etc.

How can I change the extension to be

split_file0.txt, split_file1.txt, etc?


回答1:


--additional-suffix is what you need for the additional suffix :

split -l 1000 -d --additional-suffix=.txt file.txt split_file



回答2:


There is a -d option for numeric suffixes.



来源:https://stackoverflow.com/questions/19549206/changing-the-output-filenames-in-split

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!