![]() |
|
|
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 |
| appending a file using sed in ksh | smac | Shell Programming and Scripting | 3 | 01-02-2008 04:09 PM |
| appending to sed output of one file into the middle of file | go4desperado | Shell Programming and Scripting | 5 | 02-05-2007 02:20 AM |
| Reading specific contents from a file and appending it to another file | dnicky | Shell Programming and Scripting | 5 | 10-04-2005 06:45 AM |
| appending a file | chumba | UNIX for Dummies Questions & Answers | 1 | 05-24-2001 12:09 PM |
| Appending out to a file | Astudent | UNIX for Dummies Questions & Answers | 1 | 10-20-2000 03:17 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Appending in a file
Hi,
I have file named Ex.txt which has the contents like this- <FndManagers> Mng={{PID|8819|LB}|75.000000|75.000000} Mng={{PID|25069|ML}|25.000000|0.000000} Mng={{PID|6034033|ML}|0.000000|25.000000} </FndManagers> I have a code which searches for the number 8819 and appends with the number 20.00. perl -pe 's/(\|8819\}.*)\}$/$1|20.0}/' Ex.txt Now I need to append 0 for the other lines in a similar way and th efile should look like this- <FndManagers> Mng={{PID|8819|LB}|75.000000|75.000000|20.0} Mng={{PID|25069|ML}|25.000000|0.000000|0} Mng={{PID|6034033|ML}|0.000000|25.000000|0} </FndManagers> |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|