Which lines do you need to change in the Bourne Again Shell script command_menu (page 444) to turn it into a TC Shell script? Make the changes and verify that the new script works.

What will be an ideal response?

$ cat command_menu2
#!/bin/tcsh
# menu interface to simple commands
echo "\n COMMAND MENU\n"
echo " a. Current date and time"
echo " b. Users currently logged in"
echo " c. Name of the working directory"
echo " d. Contents of the working directory\n"
echo -n "Enter a, b, c, or d: "
set answer = "$<"
echo
switch ($answer)
case a:
date
breaksw
case b:
who
breaksw
case c:
pwd
breaksw
case d:
ls
breaksw
default:
echo "There is no selection: $answer"
breaksw
endsw

Computer Science & Information Technology

You might also like to view...

________ is measured in billions of cycles per second

A) The GPU B) Clock speed C) Pipelining D) Processing speed

Computer Science & Information Technology

When you are truly interested, your eyes often ________allowing more light in so that you can see the other person better

a. Squint b. Tear c. Dilate d. Blink

Computer Science & Information Technology