Skip to content

Latest commit

 

History

History

case-statement-that-skips-option-dash-flags

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Case statement that skips option dash flags

Example:

case "$x" in
    --) printf "a double dash indicates no more options\n" ;;
    -*) printf "a starting dash indicates an option\n" ;;
    *) printf "anything else is an argument\n" ;;
esac