Nifty. Just found that on stackoverflow:
http://stackoverflow.com/questions/1...uments-in-bash
Quote:
Originally Posted by Bruno Bronosky, cwd, et al.
Preferred Method: Using straight bash without getopt[s]
I originally answered the question as the OP asked. This Q/A is getting a lot of attention, so I should also offer the non-magic way to do this. I'm going to expand upon guneysus's answer to fix the nasty sed and include Tobias Kienzler's suggestion.
Two
...