csh switch - breaksw: endsw not found
Page 130 of Beginning Shell Scripting.
Try it Out: Casing the C Shell
I saved the following code to file switch_os on ~/Desktop
echo "Please enter your favorite operating system, "
echo -n "linux, macosx, windows, amigados or beos: "
set os = $<
switch ( $os )
echo "Way cool, yoou like Linux."
echo "You like Roman numerals."
echo "Time to check for a virus."
echo "AmigaDOS will never die."
echo "Count yourself lucky."
echo "Why did you choose $os?"
I then ran the code using csh switch_os in the Terminal on Mac OS X (10.4.2). I receive the correct response for each case but each was followed by:
csh: breaksw: endsw not found.
Is this expected behavior with this OS?