Preserving Blanks in Parameters to Shell Script
Tzafrir Cohen
tzafrir at cohens.org.il
Mon Jun 14 16:58:27 IDT 2010
On Mon, Jun 14, 2010 at 11:02:11PM +1000, Amos Shapira wrote:
> On 14 June 2010 22:48, Aharon Schkolnik <aschkolnik at gmail.com> wrote:
> > On Monday, June 14, 2010, Noam Meltzer wrote:
> >> use $@ instead of $*
> >
> > Does that work for you ?
> >
> > I still get the same results - the script treates file\ one as two
> > parameters - file and one.
>
> 1. Try switching to #!/bin/bash - I think the "$@" is a bash-specific
> extension which might be disabled if bash is called as "sh".
It's not bash specific.
Mind you, on some systems /bin/sh may point to something other than
bash.
--
Tzafrir Cohen | tzafrir at jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir at cohens.org.il | | best
tzafrir at debian.org | | friend
More information about the Linux-il
mailing list