On Thu, Nov 01, 2001 at 02:29:56PM +0530, Shridhar Daithankar wrote: > Just a curious question. Will this work? > > $ ls *.gz |xargs tar -xzvf > > Looks simple than a script to me.. > ---end quoted text---
The above won't because of inadequate command line switches. The following, however will, untar every *.tar.gz giving a prompt at every file: ls *.tar.gz | xargs -p -l tar -xzvf Nice that you thought of xargs ... rarely used otherwise. Bish. -- : ####[ Linux One Stanza Tip (LOST) ]########################### Sub : Lesser known commands (xargs) LOST #167 xargs is a filter for feeding argumants to a command. It can break data stream into chunks for filters/ commands to process [e.g. 'ls | xargs -p -l gzip' gzips all files in the current directory sequentially after giving prompt at each file]. ####<[EMAIL PROTECTED]>#################################### : _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help