Exit demo 102-350 LPI Level 1 Exam 102,Junior Level Linux Certification,Part 2 of 2 PDF format · free preview

Lpi 102-350 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/102-350.html

Question 1
Single choice

Which bash option will prevent you from overwriting a file with a ">"?

A.

set -o safe

B.

set -o noglob

C.

set -o noclobber

D.

set -o append

E.

set -o nooverwrite

Question 2
Single choice

To test a shell script called myscript, the environment variable FOOBAR must be removed temporarily.

How can this be done?

A.

unset -v FOOBAR

B.

set -a FOOBAR=""

C.

env -u FOOBAR myscript

D.

env -i FOOBAR myscript

Question 3
Single choice

In the following command and its output, echo $$
12942

What is 12942?

A.

the process ID of the echo command

B.

the process ID of the current shell

C.

the process ID of the last command executed

D.

the process ID of the last backgrounded command

Question 4
Single choice

Which command will print the exit value of the previous command to the screen in bash?

A.

echo $?

B.

echo $#

C.

echo $exit

D.

echo $status

E.

echo $&

Question 5
Single choice

Which of the following SQL statements will select the fields name and address from the contacts table?

A.

SELECT (name, address) FROM contacts;

B.

SELECT (name address) FROM contacts;

C.

SELECT name, address FROM contacts;

D.

SELECT name address FROM contacts;

Question 6
Single choice

Which of the following configuration files should be modified to set default shell variables for all users?

A.

/etc/bashrc

B.

/etc/profile

C.

~/.bash_profile

D.

/etc/.bashrc

Question 7
Single choice

Which of the following is the best way to list all defined shell variables?

A.

env

B.

set

C.

env -a

D.

echo $ENV

Question 8
Single choice

Which command allows you to make a shell variable visible to subshells?

A.

export $VARIABLE

B.

export VARIABLE

C.

set $VARIABLE

D.

set VARIABLE

E.

env VARIABLE

Question 9
Single choice

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

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

Question 10
Single choice

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.

Showing 10 of 121 questions · Unlock the full set