![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| replace nth value in xml file | subin_bala | Shell Programming and Scripting | 4 | 06-18-2008 03:39 PM |
| replace words in file based on another file | kinmak | Shell Programming and Scripting | 9 | 05-07-2008 06:06 AM |
| Replace word in a file | sasiharitha | UNIX for Dummies Questions & Answers | 3 | 12-05-2007 01:11 AM |
| serach and replace file name in the path in a remote xml file | kiranreddy1215 | Shell Programming and Scripting | 1 | 11-12-2007 11:31 AM |
| Replace a Value in File | lesstjm | Shell Programming and Scripting | 5 | 05-16-2007 02:20 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Replace the file using sed
I have file with 70 lines.
I want to add 'SLV' at the starting of the line if the line has first character as 0 or 1 or 2 or ..9 Nothing else has to be changed in the file. Please anyone advice. |
|
||||
|
Check with this
Quote:
#!/usr/bin/ksh ls -l |grep .txt|nawk '{print $9}' > list while read FILE do perl -pi -e 's/01/09\/SWV/g' $FILE done <list |
![]() |
| Bookmarks |
| Tags |
| perl, sed, shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|