Which symbol will be used with grep command to match the pattern pat at the end of a line ?
Correct answer: C. pat$
- A. ^pat
- B. $pat
- C. pat$
- D. pat^
Explanation
In a grep regular expression, `$` anchors a pattern to the end of a line, so `pat$` matches lines ending with `pat`. The `^` anchor instead denotes the beginning of a line.
Report an error
The more specific you are, the faster it gets fixed. A source beats an opinion.
Prefer email? [email protected]
Practise Software Development Lifecycle
423 free Software Development Lifecycle 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 Development Lifecycle questions
What hardware architectures are not supported by Red Hat ?
What shell's wild-card is used to match any number of characters including none ?
Which of the following NIS clients, finds and stores information about an NIS domain and server ?
A relocate program form is the one which_______________?
A development stategy whereby the executive control modules of a system are coded and tested first, is known as________________?
In analyzing the compilation of PL/I program, the description "resolving symbolic address (labels) and generating machine language" is associated with________________?