Quote:
What is '' aa|ab) echo A '' ?
|
If $1 (the first commandline parameter sent to the script) is "aa" or "ab", then it will echo "A".
b? checks for a lowercase "b" followed by a single character (b5, for example, would work, but b52 would not).
c* checks for a lowercase "c" followed by anything, or "c" followed by nothing.
* is a catch-all...if none of the previous were found, it uses this option.
You received "D" as the output because you either supplied no parameters, or provided a parameter that was not listed within the case command.
You should see from your tests that the only time you did not get a "D" was when you ran "temp28 aa", which is one of the options listed in the case command.