On Wed, Jun 23, 2010 at 6:07 PM, Peng Yu <pengyu...@gmail.com> wrote: > #!/usr/bin/env bash > > function f { > #for i in $*; > for i in $@; > do > echo $i > done > } >
You can also omit the variable intirely: for i; do echo "$i" done In that case, the for loop will iterate over "$@". Andres P