ExamGecko
Home Home / LPI / 102-500

LPI 102-500 Practice Test - Questions Answers

Question list
Search
Search

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

A.
result: 3 4 5 6 2 1
A.
result: 3 4 5 6 2 1
Answers
B.
result: 1 2 3 4 5 6
B.
result: 1 2 3 4 5 6
Answers
C.
result: 6 5 4
C.
result: 6 5 4
Answers
D.
result: 6 5 4 3 2 1
D.
result: 6 5 4 3 2 1
Answers
E.
result: 3 2 1
E.
result: 3 2 1
Answers
Suggested answer: A

When the command echo $ outputs 1, which of the following statements is true?

A.
It is the process ID of the echo command.
A.
It is the process ID of the echo command.
Answers
B.
It is the process ID of the current shell.
B.
It is the process ID of the current shell.
Answers
C.
It is the exit value of the command executed immediately before echo.
C.
It is the exit value of the command executed immediately before echo.
Answers
D.
It is the exit value of the echo command.
D.
It is the exit value of the echo command.
Answers
Suggested answer: C

What word is missing from the following SQL statement? insert into tablename ________(909, 'text');

(Please specify the missing word using lower-case letters only.)

A.
VALUES, values
A.
VALUES, values
Answers
Suggested answer: A

Which command makes the shell variable named VARIABLE visible to subshells?

A.
export $VARIABLE
A.
export $VARIABLE
Answers
B.
export VARIABLE
B.
export VARIABLE
Answers
C.
set $VARIABLE
C.
set $VARIABLE
Answers
D.
set VARIABLE
D.
set VARIABLE
Answers
E.
env VARIABLE
E.
env VARIABLE
Answers
Suggested answer: B

What output will the command seq 10 produce?

A.
A continuous stream of numbers increasing in increments of 10 until stopped.
A.
A continuous stream of numbers increasing in increments of 10 until stopped.
Answers
B.
The numbers 1 through 10 with one number per line.
B.
The numbers 1 through 10 with one number per line.
Answers
C.
The numbers 0 through 9 with one number per line.
C.
The numbers 0 through 9 with one number per line.
Answers
D.
The number 10 to standard output.
D.
The number 10 to standard output.
Answers
Suggested answer: B

By default, the contents of which directory will be copied to a new user's home directory when the account is created by passing the -m option to the useradd command? (Specify the full path to the directory.)

A.
/etc/skel
A.
/etc/skel
Answers
Suggested answer: A

What word is missing from the following SQL statement?

__________ count(*) from tablename;

(Please specify the missing word using lower-case letters only.)

A.
select
A.
select
Answers
Suggested answer: A

After issuing: function myfunction { echo $1 $2 ; } in Bash, which output does: myfunction A B C Produce?

A.
A B
A.
A B
Answers
B.
A B C
B.
A B C
Answers
C.
A C
C.
A C
Answers
D.
B C
D.
B C
Answers
E.
C B A
E.
C B A
Answers
Suggested answer: A

Which of the following commands puts the output of the command date into the shell variable mydate?

A.
mydate="$(date)"
A.
mydate="$(date)"
Answers
B.
mydate="exec date"
B.
mydate="exec date"
Answers
C.
mydate="$((date))"
C.
mydate="$((date))"
Answers
D.
mydate="date"
D.
mydate="date"
Answers
E.
mydate="${date}"
E.
mydate="${date}"
Answers
Suggested answer: A

Which of the following files, when existing, affect the behavior of the Bash shell? (Choose TWO correct answers.)

A.
~/.bashconf
A.
~/.bashconf
Answers
B.
~/.bashrc
B.
~/.bashrc
Answers
C.
~/.bashdefaults
C.
~/.bashdefaults
Answers
D.
~/.bash_etc
D.
~/.bash_etc
Answers
E.
~/.bash_profile
E.
~/.bash_profile
Answers
Suggested answer: B, E
Total 194 questions
Go to page: of 20