![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| get only two letter from any string | rinku | Shell Programming and Scripting | 2 | 01-18-2008 03:07 AM |
| what is dead.letter ?? | jambesh | Shell Programming and Scripting | 2 | 08-30-2006 12:25 AM |
| how to read each letter from file and store it in variable. | rajan_ka1 | UNIX for Advanced & Expert Users | 7 | 03-06-2006 06:03 PM |
| SORT by letter | murbina | UNIX for Dummies Questions & Answers | 1 | 05-12-2004 10:04 AM |
| dead.letter | unisam | UNIX for Dummies Questions & Answers | 6 | 03-30-2004 11:33 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
I need to have a sed command insert the letter i at the end of some lines in a file. Problem is that where I want to add the i is after variables that change in each file eg, tsal314384' tsal315386' tsal317392' I need to have it like this tsal314384i' tsal315386i' tsal317392i' so the problem is that the six numbers at the end of the line are never the same. Can anyone help ? Jeremy |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Try this. It places 'i' before the single quote at the end of your lines per your example
Code:
sed "s/\'$/i'/g" file |
|
#3
|
|||
|
|||
|
hi fpmurpy
Thanks for getting onto it so quick. This has worked to some extent but now I have this problem tsal314384'i' instead of tsal314384i' Do you know what is happening here. Jeremy |
|||
| Google The UNIX and Linux Forums |