![]() |
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 |
| [help]Delete or replace text in multiple file and multiple directory | dzufauzan | Shell Programming and Scripting | 16 | 06-05-2009 11:07 AM |
| replace multiple lines in file | nox | Shell Programming and Scripting | 2 | 08-18-2008 08:44 AM |
| Adding Multiple Lines to Multiple Files | dayinthelife | Shell Programming and Scripting | 2 | 06-04-2008 11:50 AM |
| using sed command to replace multiple lines | radha.kalivar | Shell Programming and Scripting | 1 | 07-10-2007 10:36 AM |
| How can I replace multiple lines from different files | ranga27 | Shell Programming and Scripting | 2 | 02-07-2007 08:57 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
replace multiple lines in multiple files
i have to search a string and replace with multiple lines.
example Input echo 'sample text' echo 'college days' output echo 'sample text' echo 'information on students' echo 'emp number' echo 'holidays' i have to search a word college and replace the multiple lines i have lot of files to search and replace Please help me on this... |
|
||||
|
i think sed can solve your problem...
$cat file1.txt one two three four five $sed '3a >testing >again' file1.txt one two three testing again four five $ 3a mean line3..in the line 4 and line 5 inserted the text testing and again...you can open gnulamp.com and search the sed tutorial... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|