The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-17-2008
drl's Avatar
drl drl is online now Forum Advisor  
Registered User
  
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 715
Hi.

How should getopts know that the string "-f" is not an appropriate value for the argument of option "-p"? ... cheers, drl

PS In the getopts I use, the case selectors should not have leading "-" characters.

PPS Also note that you have set "d:", but did not use OPTARG in the case selector for "-d".

Last edited by drl; 03-17-2008 at 12:36 PM..