bash : getopts problem in bash script.
Hello There,
I'm having an issue using getopts in my bash script. For trouble shooting purposes I've make it simple: Code:
#!/bin/bash below is an example of what I type and the output: Code:
$ ./1_analysing -d -g -a -pimsx -ffileName I've found many example on internet but none of them are working as expected. Is there a bug some where or did I miss something? Thanks for your help; Angel. |
Try it with this change :
Code:
while getopts ":f:p:dga" OptionArgument; do Quote:
|
Problem SOLVED
Quote:
Hehe, you save my life thank you so much, my script is working like a charm now. :cool: We can even go simple: (which after testing work fine as well) Code:
while getopts "f:p:dga" OptionArgument; do |
All times are GMT -5. The time now is 10:22 PM. |