tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ How pass more than 10 parameters on cmd line?

shell expansion inside crontab ▻

$@ and $* ??

In article <377a4ff6.15132093@news.UWinnipeg.ca>,
Lyle <lyle_sNO@SPAMhotmail.com> wrote:
>What is the real difference between $@ and $* in Bourne shell

rc requires no special tricks (does this sound familiar? :-) to handle
arguments without mangling them.

For example, this rc function definition is correct.

    fn ll { ls -l $* }

In the Bourne shell, you'd have to say this.

    ll() { ls -l "$@"; }

Tim.
--
Tim Goodwin   | "You don't need to do drugs in order to
University of | think that the government's policies are
Leicester, UK | stupid and dangerous." -- David Bancroft

Original headers:

From: tjg@ltpcg.star.le.ac.uk (Tim J Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: $@ and $* ??
Date: 1 Jul 1999 11:06:44 +0100
Organization: University of Leicester, UK
Message-ID: <7lfejk$4pb$1@ltpcg.star.le.ac.uk>
References: <377a4ff6.15132093@news.UWinnipeg.ca>

△ comp.unix.shell △

◅ How pass more than 10 parameters on cmd line?

shell expansion inside crontab ▻