bash limits ?

Chris F.A. Johnson c.f.a.johnson-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Sep 9 18:29:22 UTC 2004


On Thu, 9 Sep 2004, Peter L. Peres wrote:
>
> The exact command I'm using is:
>
> SORTED=$(find $TMPDIR/* -type f|grep -E [0-9]+|cut -d'/' -f4|sort)

     What error message is it giving you?

     And wouldn't this do what you want:

SORTED=`find $TMPDIR -type -f -name '*[0-9]*' -printf "%f\n"`

> 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 !).

awk -F/ '{printf $NF}'

-- 
 	Chris F.A. Johnson                      http://cfaj.freeshell.org
 	=================================================================
                 Everything in moderation -- including moderation
--
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