Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Write a script program to use the SWITCH Command

#!/bin/tcsh
echo "Please enter a word: "
read input
#set input = $<
case $input in test)
 echo "This is a test"
 ;;
hello)
 echo "Hello world!"
 ;;
exits)
 echo "Thank you for playing"
 ;;
esac

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.