![]() |
|
|
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 |
| remove first few words from a line | shellscripter | Shell Programming and Scripting | 4 | 10-08-2008 02:34 AM |
| To read and separate number and words in file and store to two new file using shell | kamakshi s | Shell Programming and Scripting | 2 | 06-26-2008 08:39 AM |
| replace words in file based on another file | kinmak | Shell Programming and Scripting | 9 | 05-07-2008 06:06 AM |
| Read words from file and create new file using K-shell. | bsrajirs | Shell Programming and Scripting | 4 | 06-01-2007 01:15 PM |
| Looking for Words File | OC Del Guy | UNIX for Dummies Questions & Answers | 9 | 04-12-2006 08:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Remove words from file
Hello,
I have a question: I have two different files, let's call them file1 and file2. file1 contains a list of words, the words are on seperate lines: word1 word2 word3 word4 etc... file2 also contains a list of words, seperated in the same way as file1. What I want to do is remove the words that are in both file1 and file2 from file2. Does anyone know if this is possible? I tried some sed stuff, but I just can't get the desired result. Many thanks! |
|
||||
|
Thanks for your replies, but I still dont get the desired result.
I still see the words that occur in file1 in file2 after using these commands. file1 contains for example words that occur often in a text like: a the I an to be Those words also occur in file2, but I want to strip them out of file2, so I have a list of words that don't occur that much. I actually don't see why comm won't work. Are there other options to solve my problem? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|