The UNIX and Linux Forums  

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



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
search for a string ,replace the whole line with new line kkraja Shell Programming and Scripting 4 08-07-2008 03:26 AM
How to replace a line ukatru Shell Programming and Scripting 2 08-04-2008 03:51 PM
How to replace one line with three in sed ch0sen Shell Programming and Scripting 6 03-05-2008 12:08 PM
sed - Replace Line which contains the Pattern match with a new line kousikan Shell Programming and Scripting 2 03-24-2007 07:24 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0