⟩ How to get typed command history in vi editor?
in command mode typing in
:history
will show the list of commands used in
in command mode typing in
:history
will show the list of commands used in
How do you print the lines between 5 and 10, both inclusive? a) cat filename | head | tail -6 b) cat filename | head | tail -5 c) cat filename | tail +5 | head d) cat filename | tail -5 | head -10
What would be the current working directory at the end of the following command sequence? $ pwd /home/user1/proj $ cd src $ cd generic $ cd . $ pwd a) /home/user1/proj b) /home/user1/proj/src c) /home/user1 d) /home/user1/proj/src/generic
Tell me which of the following commands allows definition and assignment of environment variables under bash a) env b) export c) environ d) setenviron
The redirection 2> abc implies a) Write file 2 to file abc b) Write standard output to abc c) Write standard error to abc d) none of the mentioned
cmd 2>&1 > abc will a) Write file2 to file1 b) Write standard output and standard error to abc c) Write standard error to abc d) Write standard output to abc & standard error to monitor
From where would the read statement read if the following statements were executed? exec < file1 exec < file2 exec < file3 read line a) It would read all the files b) It would not read any files c) It would read all the files in reverse order d) It would read only file3
Which of these is the correct method for appending "foo" in /tmp/bar file? a) echo foo > /tmp/bar b) echo foo >> /tmp/bar c) echo foo | /tmp/var d) /tmp/bar < echo foo
Executing cat /etc/password > /dev/sda as superuser will a) Write data into a regular file called /dev/sda b) Write data to the physical device sda c) Create a temporary file /dev/sda and write data to it d) None of the above
Which variable contains last background job process id a) $* b) $? c) $$ d) $!
The $ variables in a shell script context designates a) The runtime of the script b) Number of command line arguments c) PID of the shell running the script d) The exit status of the shell script