The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-01-2008
unknown123 unknown123 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 19
Red face Replace line with Nothing

Hi,

i want to replace some lines in a file "Source.txt" by taking search pattern input from a different file named "abc".

Search pattern input file have following lines:

vi abc
2637918
2707239
2709124
2709148
2709159
2709177
...........

i am running following code:

for i in `cat abc` ;do perl -pi.bk4 -e 's/^.*$i.*//g' Source.txt;done

but it's not working.......
pls help.