adplus-dvertising
frame-decoration

Question

If there are special characters in a pattern, then we’ve to enclose them in ______

a.

single quotes

b.

double quotes

c.

without any quotes

d.

all quotes

Posted under UNIX

Answer: (b).double quotes

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If there are special characters in a pattern, then we’ve to enclose them in ______

Similar Questions

Discover Related MCQs

Q. Which option is used with grep command for ignoring the case in pattern searching?

Q. Which option is used with grep command for deleting lines?

Q. Which option is used for displaying the line numbers containing the pattern along with lines?

Q. ______ option counts the number of lines containing the pattern?

Q. Which option displays only the filename containing the pattern?

Q. _____ option is used when we need to match multiple patterns in a single invocation of grep command?

Q. For taking patterns from a file, -f option is specified with grep command.

Q. POSIX identifies regular expressions as belonging to ____ categories.

Q. grep command supports both extended and regular expressions.

Q. Character class is used for matching a group of characters enclosed within a pair of _____

Q. The following command will match ‘Agarwal’, ‘agarwal’ and ‘agrawal’.

$ grep “[aA]g[ar][ar]wal” emp.lst

Q. Which of the following symbol is used for matching the immediate preceding character?

Q. Which symbol is used for matching a single character?

Q. Which of the following symbols are used for matching a pattern at specified locations?

Q. The following command will match the lines beginning with ‘2’.

$ grep “^2” emp.lst

Q. Which of the following symbols are a set of ERE (extended regular expressions) ?

Q. Which option is used when we want to use an ERE with grep command?

Q. Which of the following symbols are used for matching multiple patterns?

Q. To perform context addressing, we have to enclose the pattern in ____

Q. To select lines containing gupta and agarwal, which command will be used?