Re: arg list to long wnad while command

From: Renison, Rick (rick.renison@EDS.COM)
Date: Mon Mar 31 2003 - 11:48:27 EST


  find . -name "*.$EXTENSION" -ls | while read inode size prot links user
group size moddate
do
    something
done

> -----Original Message-----
> From: John Dunn [mailto:john.dunn@SEFAS.CO.UK]
> Sent: March 17, 2003 5:51 AM
> To: aix-l@Princeton.EDU
> Subject: arg list to long wnad while command
>
>
> I currently have a script that does the following
>
>
>
> ls -ltr *.$EXTENSION 2>/dev/null | while read FILESTATUS
> NUMBER OWNER
> GROUP
>
> do
>
> something
>
> done
>
>
> I am hitting the arg list too long problem on the ls command
> when there are
> a long list of files
>
> I have tried replacing ls with find but get an error that "do
> is unexpected"
>
> find . -name '*.$EXTENSION' | xargs while read FILESTATUS
> NUMBER OWNER
> GROUP
>
>
> Can anyone help with the syntax required, please
>
> John
>



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:42 EDT