JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Unix interview questions part 19
Unix interview questions part 19
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. 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
Show Correct Answer
Correct Answer is :
double quotes
2. Which option is used with grep command for ignoring the case in pattern searching?
A. -a
B. -v
C. -i
D. -e
Show Correct Answer
Correct Answer is :
-i
3. Which option is used with grep command for deleting lines?
A. -v
B. -e
C. -a
D. -i
Show Correct Answer
Correct Answer is :
-v
4. Which option is used for displaying the line numbers containing the pattern along with lines?
A. -v
B. -i
C. -e
D. -n
Show Correct Answer
Correct Answer is :
-n
5. ______ option counts the number of lines containing the pattern?
A. -c
B. -i
C. -e
D. -n
Show Correct Answer
Correct Answer is :
-c
6. Which option displays only the filename containing the pattern?
A. -i
B. -n
C. -e
D. -l
Show Correct Answer
Correct Answer is :
-l
7. _____ option is used when we need to match multiple patterns in a single invocation of grep command?
A. -a
B. -e
C. -n
D. -i
Show Correct Answer
Correct Answer is :
-e
8. For taking patterns from a file, -f option is specified with grep command.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
9. POSIX identifies regular expressions as belonging to ____ categories.
A. 3
B. 2
C. 4
D. 5
Show Correct Answer
Correct Answer is :
2
10. grep command supports both extended and regular expressions.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
11. Which of the following is not a subset of BRE (basic regular expression) character subset?
A. *
B. .*
C. ^$
D. ch+
Show Correct Answer
Correct Answer is :
ch+
12. Character class is used for matching a group of characters enclosed within a pair of _____
A. ( )
B. “ “
C. [ ]
D. { }
Show Correct Answer
Correct Answer is :
[ ]
13. The following command will match ‘Agarwal’, ‘agarwal’ and ‘agrawal’. $ grep “[aA]g[ar][ar]wal” emp.lst
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
14. Which of the following symbol is used for matching the immediately preceding character?
A. *
B. $
C. [ ]
D. %
Show Correct Answer
Correct Answer is :
*
15. Which symbol is used for matching a single character?
A. *
B. .
C. &
D. %
Show Correct Answer
Correct Answer is :
.
16. Which of the following symbols are used for matching a pattern at specified locations?
A. *
B. ^
C. $
D. ^ and $
Show Correct Answer
Correct Answer is :
^ and $
17. The following command will match the lines beginning with ‘2’. $ grep “^2” emp.lst
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
18. Which of the following symbols are a set of ERE (extended regular expressions)?
A. #ERROR!
B. –
C. ?
D. #NAME?
Show Correct Answer
Correct Answer is :
#NAME?
19. Which option is used when we want to use an ERE with grep command?
A. -e
B. -i
C. -E
D. -i
Show Correct Answer
Correct Answer is :
-E
20. Which of the following symbols are used for matching multiple patterns?
A. |
B. &
C. ( and )
D. | and ( and )
Show Correct Answer
Correct Answer is :
( and )
Similar Interview Questions
Search for latest jobs
Find Jobs