Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parameter expansion
- X-seq: zsh-users 2279
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: r.hooft@xxxxxxxxxxxx (Rob Hooft), zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Parameter expansion
- Date: Wed, 31 Mar 1999 23:33:10 -0800
- In-reply-to: <14083.4141.374266.213229@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990331173542.A19100@xxxxxxxx> <slrn7g4do9.pg4.mason@xxxxxxxxxxxxxxxxxxxxx> <19990331180401.A20114@xxxxxxxx> <990331075131.ZM24171@xxxxxxxxxxxxxxxxxxxxxxx> <14083.4141.374266.213229@xxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author