From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18343 invoked from network); 1 Apr 1999 22:30:47 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Apr 1999 22:30:47 -0000 Received: (qmail 21907 invoked by alias); 1 Apr 1999 22:30:17 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2279 Received: (qmail 21894 invoked from network); 1 Apr 1999 22:30:10 -0000 From: "Bart Schaefer" Message-Id: <990331233310.ZM27967@candle.brasslantern.com> Date: Wed, 31 Mar 1999 23:33:10 -0800 In-Reply-To: <14083.4141.374266.213229@octopus.chem.uu.nl> Comments: In reply to r.hooft@euromail.net (Rob Hooft) "Re: Parameter expansion" (Apr 1, 8:20am) References: <19990331173542.A19100@kappa.ro> <19990331180401.A20114@kappa.ro> <990331075131.ZM24171@candle.brasslantern.com> <14083.4141.374266.213229@octopus.chem.uu.nl> X-Mailer: Z-Mail (4.0b.820 20aug96) To: r.hooft@euromail.net (Rob Hooft), zsh-users@sunsite.auc.dk Subject: Re: Parameter expansion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 1, 8:20am, Rob Hooft wrote: } Subject: Re: Parameter expansion } } I understand this is a zsh mailinglist, but I find the shell-independent } } xargs zip backup.zip < index.txt } } more readable, and it gracefully handles the case where index.txt is too } long for the command line.... Zsh can handle VERY long command lines ... much longer than required to hold the number of arguments xargs will pass to a single command by default. Does zip backup.zip file1 file2 ... fileN zip backup.zip fileN+1 fileN+2 ... file2N really do the right thing? Because that's roughly what'll get executed if there are enough lines in index.txt. Even if zip does the right thing in that case, "xargs tar zcf backup.tar" is a recipe for disaster. Finally, the whole point of the question was that index.txt contains file _patterns_, not file names; xargs, by design, won't expand file patterns, so your solution would fail completely. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com