From: Daryl.Mitchell@us.o-i.com
Date: Thu May 19 2005 - 10:25:22 EDT
lots of replies to pipe to an egrep '/[0-9]+\.out$' expression to isolate
the numeric file names. this works well. thanks too all
----- Forwarded by Daryl A Mitchell/User/O-I on 05/19/2005 10:20 AM -----
Simon Burr
<simes@bpfh.net>
To
05/19/2005 10:14 Daryl.Mitchell@us.o-i.com
AM cc
Subject
Re: find command for <number>.out
files?
On Wed, May 18, 2005 at 04:30:24PM -0400, Daryl.Mitchell@us.o-i.com wrote:
>Many suggestions are for wildcards like '[0-9]*.out', however that will
>match '7critical.out' and '123DeleteThisAndYourFired.out' , etc.. Seems
>there's no absolute safe way to do this...unless I use PERL. =)
er, no... you can do it using egrep as well, ie:
% mkdir /tmp/test
% touch /tmp/test/1.out /tmp/test/2322.out /tmp/test/499442.out \
> /tmp/test/7critical.out /tmp/test/123DeleteThisAndYourFired.out
% ls /tmp/test
1.out 499442.out
123DeleteThisAndYourFired.out 7critical.out
2322.out
% find /tmp/test -type f -print | egrep '/[0-9]+\.out$'
/tmp/test/1.out
/tmp/test/2322.out
/tmp/test/499442.out
% find /tmp/test -type f -print | egrep '/[0-9]+\.out$' | xargs rm
% ls /tmp/test
123DeleteThisAndYourFired.out 7critical.out
%
-- Simon the stressed http://www.bpfh.net/ simes@bpfh.net Chocolate is *not* a substitute for sleep _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:44 EDT