InterviewSolution
Saved Bookmarks
| 1. |
______ option counts the number of lines containing the pattern?(a) -c(b) -i(c) -e(d) -nThis question was addressed to me during an online exam.I'm obligated to ask this question of grep command in portion Filters using Regular Expressions of Unix |
|
Answer» CORRECT option is (a) -c Easy explanation: The -c option when used with grep COMMAND, COUNTS the number of LINES containing the PATTERN (which is not same as the number of occurrences of the pattern). For example, |
|