Question 51Asked in UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)

What is the function of the following UNIX command? wc -l <a >b &

What is the function of the following UNIX command? wc -l <a >b &
  1. AIt runs the word count program to count the number of lines in its input, a, writing the result to b, as a foreground process.
  2. BIt runs the word count program to count the number of lines in its input, a, writing the result to b, but does it in the background.
  3. CIt counts the errors during the execution of a process, a, and puts the result in process b.
  4. DIt copies the 'l' numbers of lines of program from file, a, and stores in file b.
Show answerHide answer

Correct answer: (B) It runs the word count program to count the number of lines in its input, a, writing the result to b, but does it in the background.

Explanation

wc -l <a >b &: wc is the word count program, -l counts lines, <a takes input from a, >b writes output to b, and & runs the command in the background. So it counts the number of lines in a, writes the result to b, and does it in the background.

From UGC NET Computer Science PYQ, June 2016 (Paper II & III, Selected Questions)

This is question 51 of UGC NET Computer Science PYQ, June 2016 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.