![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing certain text from multiple filenames | Djaunl | UNIX for Dummies Questions & Answers | 6 | 01-15-2008 05:52 PM |
| Removing M^ from multiple files | deaconf19 | Shell Programming and Scripting | 7 | 11-20-2007 02:35 AM |
| Searching and Removing File Content | rkumar28 | Shell Programming and Scripting | 7 | 02-27-2005 05:40 PM |
| Searching for multiple criteria in log files? | Relykk | Shell Programming and Scripting | 4 | 04-20-2004 03:02 AM |
| Searching multiple files with multiple expressions | Anahka | Shell Programming and Scripting | 6 | 01-07-2004 06:24 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Please Help. Need Help searching for multiple stings in a file and removing them.
Please help. Here is my problem. I have 9000 lines in file a and 500,000 lines in file b. For each line in file a I need to search file b and remove that line. I am currently using the grep -v command and loading the output into a new file. However, because of the size of file b this takes an extremely long time to do and I have 50 files similiar to file b. Is there a simpler way to accomplish this. Here is a code snippet of what I have so far.
cat $1 | while read LINE do echo $LINE grep -v $LINE fileName > OutputFile cp OutputFile fineName done |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|