>>>>> "lists" == lists  <li...@sbt.net.au> writes:

lists> I have a basic script that includes an exit on a date month
lists> condition, like so:

lists> /snip/ grep -q '07/2014' part2 && exit 0 /snip/

lists> I would like to add multiple additional non consecutive
lists> individual day date conditions, like say, 15/06/2014, 20/06,
lists> 25/06, like so;

lists>     grep -q '07/2014' part2 && exit 0 grep -q '15/06/2014'
lists> part2 && exit 0 grep -q '20/06/2014' part2 && exit 0 grep -q
lists> '25/06/2014' part2 && exit 0

lists> I guess that would work OK, but, what's a good way to put all
lists> '06' entries in a single grep, egrep or how?

As you're not using regular expressions, but just strings, fgrep is
the way to do it.  
fgrep -q '07/2014
15/06/2014
20/06/2014
25/06/2014' part 2 && exit 0

lists> thanks

lists> V

lists> -- SLUG - Sydney Linux User's Group Mailing List -
lists> http://slug.org.au/ Subscription info and FAQs:
lists> http://slug.org.au/faq/mailinglists.html
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to