Quiz Space

System Commands · End Term · 10 May 2026 · January 2026 term · Set 1-2

Question 6: A system administrator writes the following shell script …

Question 6

+5 marksOne correct option

A system administrator writes the following shell script to test whether a remote host is reachable before initiating a backup process

The command sends 1 ICMP packet to the host 192.0.2.1 All output is redirected to /dev/null The script then prints the exit status of the previous command using $?
If the host is unreachable, what will be the output of the script?

  1. A

    0

  2. B

    1

  3. C

    2

  4. D

    depends

Show answer

Correct answer

  • B

    1

Question 6 of 20 in the IIT Madras BS System Commands (System Commands) End Term paper sat on 10 May 2026, in the January 2026 term (System Commands 06 May 26). It carries 5 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2Figure question
  3. Q3Figure question
  4. Q4Figure question
  5. Q5Figure question
  6. Q7What is the output produced by the above script?
  7. Q8A system administrator creates the following script named cleanup.sh to prevent the application log file from growing t…
  8. Q9A developer writes the following Bash script to process all .txt files present in the current working directory : The s…
  9. Q10Figure question
  10. Q11What is the output after executing the shell script
  11. Q12A data engineer is given a file file.txt containing product names collected from multiple sources.\ The file may contai…
  12. Q13A repository has: How many total commits will exist after all merges?
  13. Q14After executing the following shell script Which of the following statements are true?
  14. Q15Figure question
  15. Q16Figure question
  16. Q17Consider the files f1 and f2 with their content\ File f1 with content : File f2 with content :
  17. Q18Which commands can create a new branch reference?
  18. Q19The attendance.txt file contains the following data: And the script report.awk is : How many employees receive bonuses?
  19. Q20The attendance.txt file contains the following data: And the script report.awk is : The Value of the absent variable is?