Read the following scenario. Provide the command(s) in context of the environment established in the scenario. Write your answers on the line under each question. Read the following scenario. Provide the command(s) in context of the environment established in the scenario. Write your answers on the line under each question.

1. Display the word UNIX on the screen
2. Display the * (asterisk) on the screen
3. Set a variable called Number to 10
4. Delete (unset) the variable called Number
5. Display the value of the variable called Number
6. Change the prompt string to a smiley face such as :-)
7. Use the pipe operator to send the list of the files in the current directory to the printer
8. Delay execution of a command (say date command) for 2 minutes
9. Execute a command (say sort command) as a background process.
10. Display the status of all processes
11. List the signals used for the kill command
12. Terminate the process identified by process ID 12345
13. Display a file named Xfile and at the same time save it in a file named Saved
14. Look for the word UNIX in the files in the current director. Use an option that ignores distinction between upper and lower case letters.
15. Sort a file named Xfile. Use an option that ignores distinction between upper and lower case letters.
16. Export the two variables called Var1 and Var2.
17. Set the number of entries in the history file to 200
18. lists commands in the history list
19. Set the option that prevents accidental log off when [Ctrl-d] key is used
20. Turn off the option that prevents accidental log off when [Ctrl-d] key is used
21. Set the option that prevents overwriting an existing file
22. Turn off the option that prevents overwriting an existing file
23. Turn on the command line editing option
24. Turn off the command line editing option
25. List the name of aliases

1. Display the word UNIX on the screen
=>> echo "Hello There!"
2. Display the * (asterisk) on the screen
=>> echo "*"
3. Set a variable called Number to 10
=>> Number=10
4. Delete (unset) the variable called Number
=>> unset Number
5. Display the value of the variable called Number
=>> echo $Number
6. Change the prompt string to a smiley face such as :-)
=>> PS1=":-) "
7. Use the pipe operator to send the list of the files in the current directory to the printer
=>> ls | lp
8. Delay execution of a command (say date command) for 2 minutes
=>> sleep 120 ; date
9. Execute a command (say sort command) as a background process.
=>> sort Xfile &
10. Display the status of all processes
=>> ps -a
11. List the signals used for the kill command
=>> kill -l
12. Terminate the process identified by process ID 12345
=>> kill 12345
13. Display a file named Xfile and at the same time save it in a file named Saved
=>> cat Xfile | tee Saved
14. Look for the word UNIX in the files in the current director. Use an option
that ignores distinction between upper and lower case letters.
=>> grep -i UNIX *
15. Sort a file named Xfile. Use an option that ignores distinction between upper
and lower case letters.
=>> sort -f Xfile
16. Export the two variables called Var1 and Var2.
=>> export Var1 Var2
17. Set the number of entries in the history file to 200
=>> HISTSIZE=200
18. lists commands in the history list
=>> fc -l or history (depending on the system)
19. Set the option that prevents accidental log off when [Ctrl-d] key is used
=>> set -o ignoreeof
20. Turn off the option that prevents accidental log off when [Ctrl-d] key is used
=>> set +o ignoreeof
21. Set the option that prevents overwriting an existing file
=>> set -o noclobber
22. Turn off the option that prevents overwriting an existing file
=>> set +o noclobber
23. Turn on the command line editing option
=>> set -o vi
24. Turn off the command line editing option
=>>set +o vi
25. List the name of aliases
=>>alias

Computer Science & Information Technology

You might also like to view...

Which of the following most often includes a touch pad, track ball, or small pointing stick?

A) smartphone B) laptop C) desktop D) microcomputer

Computer Science & Information Technology

A laptop with an integrated 802.11 n/g card is unable to connect to any wireless networks. Just yesterday the laptop was able to connect to wireless networks. What is the most likely the cause?

A. The wireless card drivers are not installed. B. The wireless card is disabled in bios. C. The wireless card firmware requires an update. D. The wireless hardware switch is turned off

Computer Science & Information Technology