What is the function of the following UNIX command?
wc -l a > b &
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. It runs the word-count program to count the number of lines in its input, file a, writing the result to file b, but does it as a background process.
Explanation
wc -l a counts the number of lines in file a, and the > b redirects that count into file b — this much is common to options (i) and (ii). The deciding factor is the trailing &: in the shell, a trailing ampersand always launches the preceding command as a background job, returning control to the shell immediately rather than waiting for it to finish in the foreground. So the command counts a's lines into b while running in the background, matching option (ii), not the "foreground" claim in option (i). More Software Engineering questions
- Which of the following statements about the cron daemon in a UNIX operating system is NOT correct?
- In UNIX, which single command creates the directory "PIS" together with its two subdirectories "progs" and "data" (i.e. PIS/progs and PIS/d…
- Match List I with List II
- Which of the followings is NOT a software characteristic?
- Which of the following cohesions are better than the Procedural Cohesion A. Functional Cohesion B. Sequential Cohesion C. Temporal Cohesion…
- Which of the followings belongs to MaCall's quality factors? A. Maintainability B. Usability C. Integrity D. Functionality