Which command is used to display all the lines with the string 'sales' from the file empl.lst ?
Correct answer: C. grep sales empl.lst
- A. cut sales empl.lst
- B. /sales > empl.lst
- C. grep sales empl.lst
- D. cat | /sales > empl.lst
Explanation
`grep sales empl.lst` searches `empl.lst` and prints every line containing the string `sales`. The other commands either use invalid syntax or perform unrelated file operations.
Report an error
The more specific you are, the faster it gets fixed. A source beats an opinion.
Prefer email? [email protected]
Practise Software Design and Architecture
493 free Software Design and Architecture MCQs from Software Engineering, each with the correct answer and an explanation. Unlimited attempts, no account needed.
Discussion
Stuck on an option, or know a faster way to get there? Ask or explain it here.
No comments yet. Be the first to explain this one.
Exams that ask Software Engineering questions like this
Software Engineering is on this paper prepared for on TestUstad, and all of them draw the same bank, so this question is worth knowing for it.
More Software Design and Architecture questions
What package group will you select during the custom configuration to enable the machine to communicate with Windows clients ?
What command is used to halt a Linux system ?
What command is used to display your current working directory ?
To build a modularized kernel, the kernel-headers and kernel-source packages must first be installed. Where will you find the kernel-headers and kernel-source ?
What command do you use to create Linux file systems ?
The location of some system configuration and system administrator executable files, is________________?