What command would execute cmd1 followed by cmd2, regardless of the exit status of cmd1?
A. cmd1 cmd2
B. cmd1 | cmd2
C. cmd1 ; cmd2
D. cmd1 && cmd2
E. cmd1 || cmd2
QUESTION 42 CORRECT TEXT
You have a text file with tab-separated values, but your application needs them space-separated. What command would you use from the Bash shell to achieve this? Please fill in the command only, without any options.
Which command will print to standard out only the lines that do not begin with # (pound symbol) in the file foobar?
A. /bin/grep ^# foobar
B. /bin/grep -v ^# foobar
C. /bin/grep #$ foobar
D. /bin/grep -v #$ foobar
What command will remove duplicate lines from a sorted file?
Which command line option would you use to restrict the GNU find command to searching a particular number of subdirectories?
What is the disadvantage of using the command kill -9?
A. A core dump file will be created.
B. It affects the entire process group.
C. It makes excessive use of system resources.
D. The action can be blocked by buggy or malicious processes.
E. The affected process is unable to clean up before exiting.
To prevent a command run as root from sending both standard out (stdout) and standard error (stderr) to any terminal or other file or device, which of the following strings should be appended to the command?
B. >/dev/null 1>&2
C. >/dev/null 2>&1
D. 1>&2 >/dev/null
E. 2>&1 >/dev/null
You want to search the file myfile for all occurances of string containing at least five characters, where character number 2 and 5 are ‘a’ and character number 3 is NOT ‘b’. Which command would you use?
A. grep a*^b*a myfile
B. grep .a[^b].a myfile
C. grep .[a].*.[a] myfile
D. grep .a*^b..a myfile
What does the following command do? Cat ‘$TEST’
A. Displays a bash syntax error message.
B. Displays the contents of the file named $TEST if it exists.
C. Waits for the user to enter text and then echos the text back.
D. Displays the contents of the file named inside the back quotes.
E. Displays the contents of the named by the environment variable TEST.
You want to the command foo to take its input from the file foobar and send its output to the program bar. Which of the following command lines will do this?
A. foo < foobar | bar
B. foo < foobar > bar
C. foo | foobar > bar
D. foo | bar < foobar
E. foo > bar < foobar
Download Latest LPI 117-101 DUMPS Real Free Tests , help you to pass exam 100%.