It would seem using somthing like xargs may be appropriate.

xargs <studentlist rm -<switches>

Xargs will ensure the command argument buffer is chopped into appropriate sized 
chunks.

Cheers
Shane
---- Peter Miller <[EMAIL PROTECTED]> wrote: 
On Wed, 2005-05-11 at 13:58 +1000, Julio Cesar Ody wrote:

> $ for dirname in `cat studentlist`; do rm -rf $dirname/*; done

        cat studentlist | while read dirname; do rm -rf $dirname/*; done

this will cope more elegantly with large numbers of line in the slug
student list file.  The line


-- 
Regards
Peter Miller <[EMAIL PROTECTED]>
/\/\*        http://www.canb.auug.org.au/~millerp/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to