![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Replacing string in files | mohan705 | Shell Programming and Scripting | 2 | 08-29-2007 01:27 AM |
| Problem replacing the string | Viken | Shell Programming and Scripting | 2 | 03-18-2007 06:38 PM |
| replacing char with string | phani_sree | High Level Programming | 1 | 11-20-2006 08:57 AM |
| string replacing | priya_9patil | Shell Programming and Scripting | 1 | 11-03-2006 12:05 PM |
| replacing a string in a file with command line parameter | chiru_h | Shell Programming and Scripting | 5 | 08-03-2006 09:34 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Replacing a string in nth line
Hello All,
How to replace a string in nth line of a file using sed or awk. For Ex: test.txt Line 1 : TEST1 TEST2 TEST3 Line 2 : TEST1 TEST2 TEST3 TEST4 Line 3 : TEST1 TEST2 TEST3 TEST5 Line 4 : TEST1 TEST2 TEST3 TEST6 Line 5 : TEST1 TEST2 TEST3 TEST7 i want to go to 4th line of a file and replace the word TEST2 in that line with the word DEV2. Note : this is not a homework. just need some ideas in SED or AWK Thanks Rahul |
|
||||
|
This site has great sed one-liners.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|