![]() |
|
|
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 |
| Need to replace the first word of a line if it occurs again in the next line(shell) | geeko | Shell Programming and Scripting | 4 | 06-18-2009 03:36 PM |
| how to replace a text of line with a comment line | manoj.b | UNIX for Dummies Questions & Answers | 6 | 05-21-2009 12:11 PM |
| Replace line number 2 with another line | srilaxmi | UNIX for Dummies Questions & Answers | 1 | 03-05-2009 06:31 AM |
| search for a string ,replace the whole line with new line | kkraja | Shell Programming and Scripting | 4 | 08-07-2008 03:26 AM |
| sed - Replace Line which contains the Pattern match with a new line | kousikan | Shell Programming and Scripting | 2 | 03-24-2007 07:24 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
go to a line and replace
I have a file (say file1.txt) and I have to search for a line which has a text replace it and replace another string too in the same line.
Eg: file1.txt -------- x='hai' y='world' z='unix' x='hai' y='world' x='hai' z='perl' y='world' I have to go to line which has x='hai' and y='world' and replace x='hai' to x='hello' and y='world' to y='universe' as below modified file x='hello' y='universe' z='unix' x='hai' y='world' x='hello' z='perl' y='universe' Can you please give me a command of shell program to do that Thanks Ammu |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|