bash limits ?
William Park
opengeometry-FFYn/CNdgSA at public.gmane.org
Thu Sep 9 18:19:32 UTC 2004
On Thu, Sep 09, 2004 at 08:52:45PM -0400, Peter L. Peres wrote:
> The exact command I'm using is:
>
> SORTED=$(find $TMPDIR/* -type f|grep -E [0-9]+|cut -d'/' -f4|sort)
>
> where the argument of find should expand to no more than 100 entries
> (102 with . and ..). the entries are guaranteed unique so that's not a
> problem. The cut -f4 matches several slashes which are in TMPDIR and
> leaves just the [0-9]{8} filename part to sort. Unfortunately basename
> cannot be used in a pipe (why did they write it like that ? - I should
> write a replacement that can be used in a pipe !).
I don't see any problem area. Try each command in sequence, ie.
find $TMPDIR/* -type f
find $TMPDIR/* -type f|grep -E [0-9]+
find $TMPDIR/* -type f|grep -E [0-9]+|cut -d'/' -f4
find $TMPDIR/* -type f|grep -E [0-9]+|cut -d'/' -f4|sort
You should put [0-9]+ in quotes like '[0-9]+'.
--
William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>
Open Geometry Consulting, Toronto, Canada
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list