Which symbol will be used with grep command to match the pattern pat at the beginning of a line ?
Correct answer: A. ^pat
- A. ^pat
- B. $pat
- C. pat$
- D. pat^
Explanation
In grep regular expressions, `^` anchors a pattern to the beginning of a line, so `^pat` matches lines that start with `pat`. The `$` symbol instead anchors a pattern to the end of a line.
Last updated
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.
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.
Related questions
Which of these is true ?
What is a Software ____________________ ?
Software engineers should not use their technical skills to misuse other people's computers."Here the term misuse refers to ___________________?
Explain what is meant by PRODUCT with reference to one of the eight principles as per the ACM/IEEE Code of Ethics ?
The reason for software bugs and failures is due to _____________________?