John H. Robinson, IV wrote: > Carl Lowenstein wrote: >> On 6/8/07, Todd Walton <[EMAIL PROTECTED]> wrote: >>> On 6/7/07, Carl Lowenstein <[EMAIL PROTECTED]> wrote: >>>> Here is a really simple shell script that I wrote for "pdf2up", using >>>> their tool. There are lots of other fancy features that I did not >>>> need. >>>> >>>> [EMAIL PROTECTED] ~]$ cat $(which pdf2up) >>>> #!/bin/sh >>>> java tool.pdf.Impose -nup 2 -paper letter $* > ^^ should be "$@" > complete with quotes >>> Why not an alias? >> A one-line shell script seemed easier at the time. >> >> Bash aliases don't take arguments, although that would not be problem >> in this case. > > No, what they do is append any arguments to the end of the alias. This > is why alias ll="ls -l" works as expected. > > Use "$@" instead of $* in shell scripts when expanding arguments so that > way any whitespace in the arguments are preserved.
Appending often doesn't do what you want, which is why I mentioned functions. But, jhriv -- am I remembering correctly that zsh aliases allow args? Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
