在文字檔頭加入字串? - Linux

By Elma
at 2008-11-23T15:51
at 2008-11-23T15:51
Table of Contents
※ 引述《garyzyg (garyzyg)》之銘言:
: ※ 引述《HDav (高畫質AV)》之銘言:
: : 請問要怎麼在一票文字檔開頭中加入特定字串
: : 比如說 01.txt 02.txt 03.txt 的檔頭要加入 ABC 這字串
: : 謝謝
: 改檔名:
: $ rename '' ABC 0?.txt
: 改檔案:
: $ sed -e '1i ABC' -i 0?.txt
$ sed -e '1i ABC' -i 0?.txt
sed: 1: "1i ABC
": command i expects \ followed by text
--
: ※ 引述《HDav (高畫質AV)》之銘言:
: : 請問要怎麼在一票文字檔開頭中加入特定字串
: : 比如說 01.txt 02.txt 03.txt 的檔頭要加入 ABC 這字串
: : 謝謝
: 改檔名:
: $ rename '' ABC 0?.txt
: 改檔案:
: $ sed -e '1i ABC' -i 0?.txt
$ sed -e '1i ABC' -i 0?.txt
sed: 1: "1i ABC
": command i expects \ followed by text
--
Tags:
Linux
All Comments

By Connor
at 2008-11-23T22:51
at 2008-11-23T22:51

By Delia
at 2008-11-27T17:22
at 2008-11-27T17:22
Related Posts
關於安裝ubuntu

By Joe
at 2008-11-23T15:43
at 2008-11-23T15:43
在文字檔頭加入字串?

By Ivy
at 2008-11-23T14:30
at 2008-11-23T14:30
在文字檔頭加入字串?

By Doris
at 2008-11-23T14:12
at 2008-11-23T14:12
在文字檔頭加入字串?

By Andrew
at 2008-11-23T14:01
at 2008-11-23T14:01
在文字檔頭加入字串?

By Callum
at 2008-11-23T11:05
at 2008-11-23T11:05