New answers tagged parameter
Bash doesn't typically care about the values of the arguments, it's more their ordering, and how they're separated on the command line, by default parsing them based on a space between each argument. You can see this with a simple for loop construct in a shell script like so: #!/bin/bash echo "" echo "ARGS: $@" echo "" echo "parsed args:" for i in "$@"; ...
You have to call getopts several times. You must take care what to do with the option arguments. You may use an index, write all arguments to -d to option_d[index_d++] so that you get an array. But that has nothing to do with getopts.
Maybe it is deprecated by grub2, however it should still work and must continue to work. It works for me using grub2 and debian wheezy. Also according to the official documentation it is not deprecated: https://www.kernel.org/doc/Documentation/x86/boot.txt If the command line provided by the boot loader is entered by the user, the user may expect the ...
Top 50 recent answers are included