Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: ignore list of files using readdir function (grep filter)

by tbone654 (Beadle)
on Jul 22, 2013 at 11:36 UTC ( #1045633=note: print w/ replies, xml ) Need Help??


in reply to Re: ignore list of files using readdir function (grep filter)
in thread ignore list of files using readdir function

Put what you want to exclude or include into a file (eg. file1) one per line... Put the output of the directory contents into file2...
grep -i -v -f file1 file2
similarly if you wish to "match" everthing in file1 leave off the -v
grep -i -f file1 file2
the -i ignores case so leave that off if you wish an exact match (case sensitive)
grep -f file1 file2
the first file after the -f is always the "from" file


Comment on Re^2: ignore list of files using readdir function (grep filter)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2015-07-29 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls