How to remove all objects BEFORE first whitespace using sed or awk?
How to remove all objects BEFORE first white space using sed or awk?
source sample derf3eef3fd34rf/rf3/4f34f/4/stuffudontwant stuffIwant.here desired output stuffiwant.here I also need a script or one liner that will remove a list of objects from a text file,that is provided from a list in a seperate text file. |
Quote:
Code:
echo derf3eef3fd34rf/rf3/4f34f/4/stuffudontwant stuffIwant.here Code:
stuffIwant.here |
Quote:
Daniel B. Martin |
Quote:
Sure, I have a large list1 of line by line items, and I have another list2 of items that are in that large list1, and I needed to remove every line from large list1 contained in list2 Large list 1 site.com url.com stuff.com porno.com msn.com rap.com crap.com aol.com morecrap.com shizzo.com meatspin.com blah.com microsoft.com eatpussy.com And list2 contains a list of items to be removed from large list1 site.com url.com stuff.com porno.com rap.com crap.com morecrap.com shizzo.com meatspin.com In this example the desired output should be aol.com msn.com microsoft.com |
Quote:
I think the comm command will do the job, after sorting both files. Check into it. Daniel B. Martin |
Quote:
Code:
grep -Fvf remove-these.txt items.txt > remaining-items.txt |
Quote:
Daniel B. Martin |
:(
Quote:
This isnt going to work for me because I have a huge list of lines like this. |
Quote:
|
Quote:
Code:
cut -d ' ' -f2 $InFile > $OutFile In my programs they are usually named thusly: Code:
# File identification Daniel B. Martin |
All times are GMT -5. The time now is 08:47 PM. |