Re: Logging of commands in a bash script to a file
On Wed, 2014-04-23 at 19:42 +0200, Ralf Mardorf wrote:
> On Wed, 2014-04-23 at 13:10 -0400, Patrick Chkoreff wrote:
> > Good, but I think you can avoid the positional params by just using $@
>
> If you use $1 $2 $3 ..., then you at least should use a loop, by taking
> care of the count of parameters, using $# which does show how much
> parameters are used.
>
> I usually use $*, it's "quasi" equal to $@, but easier to remember,
> because * is also used as a wildcard for globbing. However, $* and $@ is
> for ($1 $2 $3 ...), while "$@" other than "$*" expanded to "$1" "$2"
> "$3" ...
"$*" is "$1 $2 $3 ... $n"
Reply to: