On Thu, Sep 16, 2010 at 02:06:11PM -0700, Mun wrote:
> I have a script which uses getopts that I need to source in my
> interactive shell.  The problem is that if I source it, getops behaves
> as if no arguments were passed into the script.

What are you actually doing?  It works for me:

imadev:~$ cat ~/bin/args
#! /bin/sh
printf "%d args:" $#
printf " <%s>" "$@"
echo
imadev:~$ set -- one two three
imadev:~$ source args
3 args: <one> <two> <three>

Reply via email to