![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extract a line from a file using the line number | zambo | Shell Programming and Scripting | 1 | 05-01-2008 10:39 AM |
| Appending line number to each line and getting total number of lines | chiru_h | Shell Programming and Scripting | 2 | 03-25-2008 06:19 AM |
| extract a line from a file using the line number | grandtheftander | Shell Programming and Scripting | 6 | 02-06-2008 02:12 AM |
| Appending a line in a file after a particular line | maxvirrozeito | Shell Programming and Scripting | 7 | 12-12-2007 09:58 AM |
| Get line form file by line number | corny | Shell Programming and Scripting | 3 | 08-25-2006 09:18 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi, I am a newb as far as shell scripting and SED goes so bear with me on this one.
I want to basically append to each line in a file a delimiter character and the line's line number e.g Change the file from :- aaaaaa bbbbbb cccccc to:- aaaaaa;1 bbbbbb;2 cccccc;3 I have worked out how to append the ";" to the end of each line ( sed '1,$s/$/;/') but am stumped with the line number bit This is on a Sun Solaris box btw. Any help appreciated. Thanks Paul |
| Forum Sponsor | ||
|
|