Sample Header Ad - 728x90

How do I handle switches in a shell script?

26 votes
4 answers
53417 views
Are there some built-in tools that will recognize -x and --xxxx as switches (*flags* or "boolean options", rather than "ordinary arguments"), or do you have to go through all the arguments, test for dashes, and then parse the rest thereafter?
Asked by user394 (14722 rep)
Sep 18, 2011, 06:47 PM
Last activity: Jun 13, 2024, 09:31 AM