Multiple choice unix

Which command sends the word count of the file infile to the newfile.

  1. wc infile >newfile

  2. wc <infile >newfile

  3. wc infile - newfile

  4. wc infile | newfile

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The &gt; operator redirects the standard output of a command to a file. wc infile calculates the word count of the specified file, and &gt;newfile saves that result into 'newfile'. Option 272 is also technically functional but less direct, while 273 and 274 use invalid syntax for this purpose.