Question
Write the steps involved in creating and executing a program to implement the “case” command?

Answers

The steps involved are as follows:
- Login as an ordinary user.
- Open the text editor.
- Open the terminal window.
- Type the following script:

#!/bin/sh
echo “ What is your car model? c”
read car
case”$mycar” in
Ford)
echo “An American car”
echo “Made in Detroit”
;;
Mercedes)
echo “ Are you sure you own one?”
;;
*)
echo “Never heard car”
esac

- Save the script with a name testscript.
- Type command in terminal chmod 777 testscript.
- Type ./myscript21   Your Comment






Search
Can you Answer!!
  • Q What are parameters needed to distinguish an event ?
  • Q You wish to upgrade the IOS of a router without removing the image currently installed. What command will display the amount of memory that is being used by the current IOS image and whether there is enough room available to hold both the current and new images? A. Router# show version B. Router# show flash C. Router# show memory D. Router# show buffers E. Router# show running-config F. All of the above
  • Q When will you use a factory pattern?
  • Q #define f(a,b) a+b #define g(a,b) a*b main() { int m; m=2*f(3,g(4,5)); printf(" m is %d",m); } what's the value of m a.70 b.50 c.26 d. 69
  • Q What according to you is sunk cost?
  • Q How do you clear a GUI map files?
  • Q Jnanpith Award is a prestigious award given annually for contribution in which field?
  • Q How do you know what you don't know?
  • Q Which method is used to update the documents into a collection?
  • Q Expand EPSLON
  • Q Define the term dangling pointer. Describe how the unique-id scheme helps in detecting dangling pointers in an object-oriented database?