Unix/Lunux MCQ Quiz Hub

Linux Mcqs Questions Set 6

Choose a topic to test your knowledge and improve your Unix/Lunux skills

1. Which command executes ‘command’ in place of the current process instead of creating a new process?




2. Which one of the following statement is not true?




3. Which command is used to close the vi editor?




4. In vi editor, the key combination CTRL+f




5. Which vi editor command copies the current line of the file?




6. Which command is used to delete the character before the cursor location in vi editor?




7. Which one of the following statement is true?




8. Which command searches the string in file opened in vi editor?




9. In vi editor, which command reads the content of another file?




10. Which command shows all the abbreviations in vi editor?




11. Which command sets the number for all lines?




12. What is sed?




13. Sed maintains the hold space (a buffer) to




14. Which is the correct syntax for sed on command line?




15. If any sed command does not specify any address then the command is applied to




16. If no file is specified in sed command then




17. Which sed command deletes the specified address range




18. Which command is used to replace word ‘cat’ (already present in the file) with ‘mouse’ at all places in a file ‘old.txt’ and save the result in a new file ‘new.txt’?




19. Which command will delete all the blank lines in file old.txt?




20. The command “sed -n ‘/sanfoundry/p’ old.txt” will




21. Which option is used by sed to specify that the following string is an instruction or set of instructions?




22. Which one of the following is not true?




23. An awk program can be run by




24. Which one of the following is not true?




25. What is the meaning of $ sign in awk programming?




26. In awk program, the statement “print” with no items




27. The print and printf statements can be told to send their output to other place except standard output, is called




28. The command “awk {print $1} san.txt” will




29. What is the output of the command awk ‘BEGIN {printf “%c ”,65}’




30. Which one of the following statement is not true about the format-control letters for printf statement in awk program?




31. What is expression in awk programming?




32. Which one of the following is not true?




33. All numeric values are represented within awk in




34. Concatenation is performed by




35. The comparison expression x ~ y will true if




36. The break statement




37. Which statement skips over the rest of the loop body, causing the next cycle around the loop to begin immediately?




38. The next statement




39. If the argument is supplied to the exit statement,




40. Which statement instructs gawk to stop processing the current data file?




41. The command awk {if (“9″>”10”) print sanfoundry else print linux}




42. Which one of the following statement is not true?




43. What is the difference between the built-in functions rand() and srand() in awk programming?




44. Which built-in function returns the arctangent of a/b in radians.




45. Which built-in function divides string into pieces seperated by fieldsep and stores the pieces in array?




46. The built-in function tolower()




47. In awk, the built-in variable FS is




48. What is FNR?




49. RSTART is set by invoking the




50. Which one of the following is used by awk to control the conversion of numbers to string?