Write a script named myname that uses echo (most of the examples in Chap- ter 10 use this utility) to prompt the user with Enter your name: , reads into a variable the string the user types in response to the prompt, and then dis- plays Hello followed by the string the user typed. When you run the program it should look like this:
$ ./myname
Enter your name: Max Wild
Hello Max Wild
$ cat myname
#!/bin/bash
#
# Program to prompt the user, read the string the user types,
# and display the string the user typed
#
echo -n "Enter your name: "
read ustring
echo "Hello" $ustring
You might also like to view...
What is the Work buffer? Name two ways of writing the contents of the Work buffer to the disk.
What will be an ideal response?
The six states of a Windows thread are: Ready, Standby, Running, Waiting, Transition, and _________
Fill in the blank(s) with the appropriate word(s).
The __________ method copies the sourceArray to the targetArray.
a. System.copyArrays(sourceArray, 0, targetArray, 0, sourceArray.length); b. System.copyarrays(sourceArray, 0, targetArray, 0, sourceArray.length); c. System.arrayCopy(sourceArray, 0, targetArray, 0, sourceArray.length); d. System.arraycopy(sourceArray, 0, targetArray, 0, sourceArray.length);
Which of the following is true of a NIPS system?
A. cannot take action to prevent attacks B. slows performance C. inexpensive D. eliminates false positives