#! /bin/csh -f # # Filename: input1 # # This C shell script simply prompts the user for a y/n reply and # echoes the result to the screen. # while (1) echo -n "Do you wish to continue (y/n)? " switch ("$<") case "n": set reply = "n" break # breaks out of the loop case "y": set reply = "y" break endsw end if ($reply == "y") then echo "Your reply was yes." # Here is where we could place the code for whatever is to be done. else echo "Your reply was no." endif