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

Computer Science & Information Technology

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?

Computer Science & Information Technology

The six states of a Windows thread are: Ready, Standby, Running, Waiting, Transition, and _________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

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);

Computer Science & Information Technology

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

Computer Science & Information Technology