coldcoffee 发表于 2006-9-19 15:00:59

空格转<TAB>?

什么命令可以把文件里的空格转成<TAB>制表符?

nonamexz 发表于 2006-9-20 14:17:34

我也刚开始学shell
花了半个小时才算调试出一个方法来
这是我在linux公社的第一贴啊
5555555555,我的第一次就这么...........


[root@TestServer /]# cat t.txt
noname test hell
[root@TestServer /]# sed -n 's/ /\t &/pg' t.txt >tt.txt
[root@TestServer /]# cat tt.txt
noname    test    hell
[root@TestServer /]#

BOoRFGOnZ 发表于 2006-9-21 09:28:42

:-D
页: [1]
查看完整版本: 空格转<TAB>?