The "getopts" command assumes that you will be using standard unix command line syntax (like in your post #1).
What Operating System and version do you have?
What Shell are you using?
When you go the error message, what was in your shell script and what did you type to invoke the script?
Quote:
also please let me know what does 'abc' in 'while getopts abc opt' means...
The "abc" is the list of possible options (-a, -b , -c). The command line is parsed and each value is placed in turn into the environment variable $opt. If you supply three options on the command line the while loop executes three times (once for each option).
There is an extensive expanation in "man getopts".
The rest of you post means nothing to me.