Computer Science - Unix - Discussion

Discussion :: Unix - Section 1 (Q.No.1)

1. 

Which symbol will be used with grep command to match the pattern pat at the beginning of a line?

[A]. ^pat
[B]. $pat
[C]. pat$
[D]. pat^
[E]. None of the above

Answer: Option A

Explanation:

No answer description available for this question.

Dheeaj said: (Oct 9, 2011)  
^sign is used to search from the begining.

Ankit Gupta said: (Feb 21, 2013)  
sign^ is used to search from the end.

^sign is used to search from the beginning.

Manjay said: (Apr 30, 2013)  
$ sign is used to search from the end.

Jayachitra said: (Nov 25, 2013)  
^ for matching at the beginning of a line.

$ for matching at the end of a line.

Gayathri said: (Mar 22, 2014)  
It is a correct answer ^start point of line.

$end part of line.

Maytas said: (Aug 29, 2014)  
We can do it by using the command like :

grep ^pat files

Reddy said: (Dec 1, 2014)  
^ used from starting in the file.

Anpt said: (Apr 1, 2015)  
Echo "hello world" | grep "^he".

Vandana Sharma said: (Aug 15, 2015)  
Which of the following is not communication command?

Alia said: (Nov 23, 2015)  
Echo "pattern" | grep "^pat" is used to search from starting.

Echo "pattern" | grep "rn$" is used to search from end.

Nileshraje said: (Jul 27, 2018)  
^ for matching at the beginning of a line.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.