Re: Issue with Getopts

2010-11-14 Thread Dennis Williamson
It would be helpful if you posted the error message. When you say normally, I assume you mean bash -c script.sh Most likely the first line of your script is something other than: #!/bin/bash On Mon, Nov 15, 2010 at 1:11 AM, Ajay Jain wrote: > Hi, > > I use 'getopts' in my shell script. If I r

Issue with Getopts

2010-11-14 Thread Ajay Jain
Hi, I use 'getopts' in my shell script. If I run script normally, it works fine. However, the moment I run the script in the current shell (ie . ), it fails returning error. Basically it is not able to parse the arguments. Any reason, why? Regards, Ajay.