The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
unsetting OPTINT in getopts
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
unsetting OPTINT in getopts
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
10-07-2008
vidyadhar85
Moderator(The Tutor)
Join Date: Jun 2008
Location: INDIA
Posts: 1,419
when ever shell invokes OPTIND is initialized to 1
since you are calling function many times in same shell you are getting that error
so as
cfajohnson
suggested set OPTIND to in at the starting of function
vidyadhar85
View Public Profile
Find all posts by vidyadhar85
Find vidyadhar85's past nominations received
Find vidyadhar85's present nominations given