Question: 11. Suppose we execute the following command: $( date ; rm file.txt )> output.log 2>&1 where file.txt does not exit. What is happening after the



11. Suppose we execute the following command: $( date ; rm file.txt )> output.log 2>&1 where file.txt does not exit. What is happening after the execution of this command? - A. The date and an error are displayed on the screen. - B. The date is saved in output.log and an error will be displayed on the screen. - C. The date and an error are saved in the file output.log Circle the correct response. Suppose we have a file called ksatowns.txt containing the words, Mekkah, Medinah, Riadh, Jeddah and Dammam (The words are separated by simple space, multi-spaces, a Tab or multi-Tabs). 12. The line command which lists the lines containing the word Mekkah and appends them to the file output.txt is - A. grep "Mekkah" ksatowns.txt >> output.txt - B. cat ksatowns.txt grep "Mekkah" >> output.txt - C. trn/ Mekkah/p' ksatowns.txt >> output.txt Circle the correct responses. 13. The command line which searches the lines beginning with Mekkah and ending with Medinah with line number is - A. grep -n " Mekkah" ksatowns.txt grep "Medinah\$" - B. grep " Mekkah" ksatowns.txt | grep -n "Medinah\$" 3/4 - C. grep "Mekkah" "Medinah $ " ksatowns.txt Circle the correct response. 14. Using the tr command give the command line which replaces the multi-spaces, multi-Tabs and Tabs with a single space. 15. Suppose we execute the following command tr '[:lower:]' '[:upper:]' file.txt > Today is midterm exam >END The command will - A. put the words "Today is midterm exam" in the file.txt. - B. replace the lower cases by upper cases and display the words "Today is midterm exam" in the screen. - C. put the words "TODAY IS MIDTERM EXAM" in the file file.txt. Circle the correct response
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
