Can command line switches be combined?
• -p and -a will not appear together (although you could just pick one arbitarily). • Any subset of the following options can occur: -p, -i, -o and -w (in any order). • Any subset of the following options can occur: -a, -i, -o and -w (in any order). • Options won’t be combined together into a single switch, (as in -pi). • You should print out errors for unknown switches in the order processed, but otherwise ignore them. For example: if the input where hexdump -z -ma -p -i foo.name you should output: Unknown switch: -z Unknown switch: -ma 00 00 00 00 00 00 01 00 2E 64 79 6E 73 79 6D 00 2E 72 65 6C 2E 64 79 6E Total bytes: 24 Many UNIX utilities tend to abort when there are unknown switches, so this is somewhat non-standard behavior to ignore unknown switches. The error messages are printed just so we can tell they are there. Note that: • Switches are case sensitive. That is, -p and -P are not the same switch. • You can assume that a valid switch will have the correct number of arguments