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...

Compare and contrast a DDBMS with a parallel DBMS. Under what circumstances would you choose a DDBMS over a parallel DBMS?

What will be an ideal response?

Computer Science & Information Technology

Networks like the kind in the accompanying figure are classified by ____.

A. geographical structure B. physical topology C. organizational structure D. bandwidth

Computer Science & Information Technology

To deselect one of the selected multiple controls, press and hold ________ while clicking with the pointer

A) [Alt] B) [Tab] C) [Ctrl] D) [Esc]

Computer Science & Information Technology

Where is an Access database password stored?

A. in an Access module B. in an Access table named tblPW C. it is not stored anywhere D. in a separate database created by Access

Computer Science & Information Technology