On Sat, 02 Sep 2006, David Laight wrote: > So you want the first arguments? > if you don't need to worry about spaces in the options then: > > get_opts() { > opts="$*" > shift $((OPTIND-1)) > opts="${opts:%$*}" > } > > then > get_opts "$*" Neat trick, but I think you want "$@" in the last line. --apb (Alan Barrett)