What is the canonical way to implement order independent options in bash scripts? [closed]

view story

http://unix.stackexchange.com – Possible Duplicate: How do I handle switches in a shell script? Most common shell commands allow the user to specify options in any random order. Positional Parameters like $1 as commonly used in bash (I tend to write all my scripts in Bash but I don't think this question is actually Bash specific) scripts on the other hand, are order specific. Now I could come up with some way to remove the need for the user of a bash script to observe any particular order in the supplying of optional arguments. (Using regular expressions or globs to test for the presence of some particular optio (HowTos)