JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Unix interview questions part 44
Unix interview questions part 44
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which option is used for checking if the file exists or not?
A. -e
B. -a
C. -n
D. -f
Show Correct Answer
Correct Answer is :
-e
2. Which of the following option is used for checking if the file is readable or not?
A. -r
B. -f
C. -n
D. -z
Show Correct Answer
Correct Answer is :
-r
3. Which of the following option is used for checking if the file is writable or not?
A. -e
B. -f
C. -n
D. -w
Show Correct Answer
Correct Answer is :
-w
4. To check if the file exists and is executable we have to use ___ option with test.
A. -e
B. -f
C. -x
D. -w
Show Correct Answer
Correct Answer is :
-x
5. -d option is used for checking if the file exists and is a directory.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
6. ____ option is used for checking whether a particular file is older than a specified file.
A. -ef
B. -old
C. -nt
D. -ot
Show Correct Answer
Correct Answer is :
-ot
7. To check if two files are linked to each other, we can use -ef option.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
8. Which filter apart from perl, is the most powerful?
A. sed
B. awk
C. grep
D. cut
Show Correct Answer
Correct Answer is :
awk
9. Awk filter operates at field level.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
10. Which of the following will be used to print lines containing ‘manager’ in emp.lst?
A. awk ‘/manager/ { print }’ emp.lst
B. awk ‘/manager { print }’ emp.lst
C. awk ‘/manager/ { print } emp.lst
D. awk ‘manager { print }’ emp.lst
Show Correct Answer
Correct Answer is :
awk ‘/manager/ { print }’ emp.lst
11. The default action if selection_criteria is missing is ____
A. print
B. split
C. print and split
D. no default action
Show Correct Answer
Correct Answer is :
print
12. For pattern-matching, awk uses regular expressions in ____ style.
A. sed
B. grep
C. perl
D. print
Show Correct Answer
Correct Answer is :
sed
13. awk uses ______ for splitting a line into fields.
A. special parameters
B. shell variables
C. env variables
D. command arguments
Show Correct Answer
Correct Answer is :
special parameters
14. Which built-in variable is used by the awk to specify the line numbers?
A. AR
B. NR
C. $$
D. $?
Show Correct Answer
Correct Answer is :
NR
15. What is the default delimiter used by awk?
A. tab
B. whitespace
C. double space
D. |
Show Correct Answer
Correct Answer is :
whitespace
16. The printf function uses ___ for string data and ___ for numeric.
A. %f, %l
B. %s, %f
C. %s, %d
D. %s, %s
Show Correct Answer
Correct Answer is :
%s, %d
17. awk doesn’t use $ in evaluation or assignment of variables.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
18. A user-defined variable is initialized to ____
A. zero
B. zero or null string
C.
D. operator
Show Correct Answer
Correct Answer is :
zero or null string
19. awk uses ___ operator for concatenating strings.
A. >
B. |
C. *
D. no operator available
Show Correct Answer
Correct Answer is :
no operator available
20. awk uses __ and __ as comparison operators.
A. $$, ^^
B. ||, &&
C. %%, ##
D. ||, @@
Show Correct Answer
Correct Answer is :
||, &&
Similar Interview Questions
Search for latest jobs
Find Jobs