From: Chris Leven (Chris.Leven@GARLOCK.COM)
Date: Mon Mar 17 2003 - 08:30:25 EST
Run the ls into a file and then read the file into your loop to process.
Christopher Leven
Senior Programmer/Analyst
IBM Certified Specialist AIX Administration
IBM Certified Specialist AIX Support
IBM Certified Specialist RS6000/SP - PSSP 3.1
Garlock Sealing Technologies
An EnPro Industries Company
1666 Division Street
Palmyra, New York 14522
*Voice: 315.597.3034
*Fax: 315.597.7250
*Email: Chris.Leven@Garlock.com
Note new Email address
-----Original Message-----
From: John Dunn [mailto:john.dunn@SEFAS.CO.UK]
Sent: Monday, March 17, 2003 6:11 AM
To: aix-l@Princeton.EDU
Subject: ls and while
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
----------Legal Disclaimer----------
The information contained in this message may be privileged and confidential, and is intended solely for the use of the named addressee. No other person is authorized to access, copy or re-use this message (or any information contained herein). If you are not the intended recipient, please notify us immediately by replying to this message and delete it from your computer.
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:40 EDT