#! /bin/csh -f # # Filename: switch1 # # Syntax: switch1 string # # The idea is to use one, two, or three for the string. # if ($#argv != 1) then echo "ERROR -- one command line argument is required" exit(1) endif switch ($argv[1]) case one: echo "This is case one" breaksw case two: echo "This is case two" breaksw case three: echo "This is case three" breaksw default: echo "You did not enter one, two, or three" endsw echo "End of program" exit(0)