LPI
101-500 · Question #382
The file myfile.txt contains the following data: joe:x:100:100:Joe:/home/joe:/bin/bash mike:x:101:101:Mike:/home/mike:/bin/sh kevin:x:102:102:Kevin:/home/kevin:/bin/sh…
The correct answer is B. home. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
GNU and Unix Commands
Question
The file myfile.txt contains the following data: joe:x:100:100:Joe:/home/joe:/bin/bash mike:x:101:101:Mike:/home/mike:/bin/sh kevin:x:102:102:Kevin:/home/kevin:/bin/sh matt:x:103:103:Matt:/home/matt:/bin/sh What output will be displayed on the screen when the following command is executed: grep -o home myfile.txt
Options
- ANo output will be displayed on the screen
- Bhome
- C/home/joe
- Djoe
How the community answered
(44 responses)- A5% (2)
- B86% (38)
- C7% (3)
- D2% (1)
Explanation
You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
Topics
#grep#pattern matching#-o flag#text processing
Community Discussion
No community discussion yet for this question.