JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Unix interview questions part 36
Unix interview questions part 36
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which one of the following command is used for replacing | with : globally?
A. sed ‘s/|/:/’ emp.lst
B. sed ‘/|/:/’ emp.lst
C. sed ‘s/|/:/g’ emp.lst
D. sed ‘s/
Show Correct Answer
Correct Answer is :
sed ‘s/|/:/g’ emp.lst
2. To replace the string ‘director’ in the first five lines of file emp.lst with ‘manager’ we can use _____
A. sed ‘s/director/manager/’ emp.lst
B. sed ‘1-5s/director/manager/’ emp.lst
C. sed ‘1,5s/director/manager/’ emp.lst
D. sed ‘15s
Show Correct Answer
Correct Answer is :
sed ‘1,5s/director/manager/’ emp.lst
3. Which of the following characters are used with sed as anchoring characters?
A. $
B. ^
C. %
D. $ and ^
Show Correct Answer
Correct Answer is :
$ and ^
4. What will be the function of the following command? $ sed ‘s/ *|/|/g’ emp.lst
A. replace * with |
B. replace / with |
C. compress multiple spaces
D. erroneous output
Show Correct Answer
Correct Answer is :
compress multiple spaces
5. Basic regular expressions are divided into ______ categories.
A. 1
B. 3
C. 2
D. 5
Show Correct Answer
Correct Answer is :
3
6. The interval regular expression uses the character _______
A. {
B. }
C. { and }
D. ( and )
Show Correct Answer
Correct Answer is :
{ and }
7. Which one of the following command will be used for adding two spaces before every line in emp.lst?
A. sed ‘s/^/ /’ emp.lst
B. sed ‘s / / /’emp.lst
C. sed ‘s /$/ /’emp.lst
D. sed ‘s/$/
Show Correct Answer
Correct Answer is :
sed ‘s/^/ /’ emp.lst
8. Which shortcut does sed offer to replace the string Linux with Red hat Linux?
A. { }
B. ( )
C. ^^
D. &
Show Correct Answer
Correct Answer is :
&
9. Which command will be used for selecting lines 3 to 10 from emp.lst?
A. sed 3,10 emp.lst
B. sed -n ‘3,10p’ emp.lst
C. sed -n ‘^,10p’ emp.lst
D. sed -n, 10p
Show Correct Answer
Correct Answer is :
sed -n ‘3,10p’ emp.lst
10. Shell provides us with an interface to the operating system.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
11. On a UNIX system, there can be ____ shells running simultaneously.
A. 1
B. 2
C. many
D. 4
Show Correct Answer
Correct Answer is :
many
12. There can be multiple kernels on a single UNIX system.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
FALSE
13. The prompt issued by the shell is called ______
A. prompt
B. command translator
C. command prompt
D. command executor
Show Correct Answer
Correct Answer is :
command prompt
14. In UNIX there are ___ major types of shells.
A. 2
B. 3
C. 4
D. many
Show Correct Answer
Correct Answer is :
2
15. What is the default symbol for command prompt in Bourne shell?
A. $
B. %
C. #
D. @
Show Correct Answer
Correct Answer is :
$
16. What is the default symbol for command prompt in C shell?
A. $
B. %
C. #
D. @
Show Correct Answer
Correct Answer is :
%
17. Which one of the following command will display the name of the shell we are working on?
A. echo shell
B. echo $
C. echo $SHELL
D. echo $$
Show Correct Answer
Correct Answer is :
echo $SHELL
18. Which shell is the most common and best to use?
A. Korn shell
B. POSIX shell
C. C shell
D. Bash shell
Show Correct Answer
Correct Answer is :
Bash shell
19. Which command does not terminates unless we log out of the system?
A. history
B. shell
C. echo
D. login
Show Correct Answer
Correct Answer is :
shell
20. In Shell’s interpretive cycle, the shell first scans for ____ in the entered command.
A. characters
B. priority
C. meta-characters
D. wildcards
Show Correct Answer
Correct Answer is :
meta-characters
Similar Interview Questions
Search for latest jobs
Find Jobs