Results 1 to 3 of 3
Hi,
I am trying to appending additional text to every line in a text file, can anyone advise me how to construct a ksh script, thanks!
a.txt
------
045345
23455
...
- 05-10-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 14
Appending text to the lines in the file
Hi,
I am trying to appending additional text to every line in a text file, can anyone advise me how to construct a ksh script, thanks!
a.txt
------
045345
23455
i want to append "My menu id is :" to every line in a.txt. Desire result:
a.txt
-----
My menu id is : 045345
My menu id is : 23455
Thanks
- 05-10-2007 #2Linux User
- Join Date
- Aug 2006
- Posts
- 458
Code:sed 's/^/My Id is: /' file > newfile
Code:awk '{print "My id is "$0}' file > newfile
- 05-10-2007 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 14
Thanks a lot! It is working


Reply With Quote