CompTIA LX0-104 - CompTIA Linux+ Powered by LPI 2 Exam
Page: 1 / 36
Total 178 questions
Question #1 (Topic: Shells, Scripting and Data Management)
What output will the following command sequence produce?
echo '1 2 3 4 5 6' | while read a b c; do
echo result: $c $b $a;
done
echo '1 2 3 4 5 6' | while read a b c; do
echo result: $c $b $a;
done
A. result: 3 4 5 6 2 1
B. result: 1 2 3 4 5 6
C. result: 6 5 4
D. result: 6 5 4 3 2 1
E. result: 3 2 1
Answer: A
Question #2 (Topic: Shells, Scripting and Data Management)
When the command echo $ outputs 1, which of the following statements is true?
A. It is the process ID of the echo command.
B. It is the process ID of the current shell.
C. It is the exit value of the command executed immediately before echo.
D. It is the exit value of the echo command.
Answer: C
Question #3 (Topic: Shells, Scripting and Data Management)
FILL BLANK
What word is missing from the following SQL statement?
insert into tablename ________(909, 'text');
(Please specify the missing word using lower-case letters only.)
What word is missing from the following SQL statement?
insert into tablename ________(909, 'text');
(Please specify the missing word using lower-case letters only.)
Answer: VALUES -or- values
Question #4 (Topic: Shells, Scripting and Data Management)
Which command makes the shell variable named VARIABLE visible to subshells?
A. export $VARIABLE
B. export VARIABLE
C. set $VARIABLE
D. set VARIABLE
E. env VARIABLE
Answer: B
Question #5 (Topic: Shells, Scripting and Data Management)
What output will the command seq 10 produce?
A. A continuous stream of numbers increasing in increments of 10 until stopped.
B. The numbers 1 through 10 with one number per line.
C. The numbers 0 through 9 with one number per line.
D. The number 10 to standard output.
Answer: B