mandatory and optional arguments
Hi ,
I am using getopts to take parse optional arguments but i also pass in mandatory arguments first Code:
#!/bin/bash But when i pass in the wrong number of mandatory arguments and pass in the optional argument the command line gets all messed up like so ./script arg1 -f BLAH -d DIR Argument 1 = arg1 Argument 2 = -f File= Dir= Any ideas how to stop this ??? |
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
|
All times are GMT -5. The time now is 05:35 AM. |