[plug] Simple bash scripting problem

Cameron Patrick cameron at patrick.wattle.id.au
Mon Oct 10 17:47:41 WST 2005


Timothy White wrote:

> [1] The problem part....
> for file in $*; do

You want $@:

$ cat foo.sh 
#! /bin/sh
for x in "$@"; do
        echo $x
done

$ sh foo.sh "bar" "baz quux"
bar
baz quux






More information about the plug mailing list