A conditional that lets you make multiple comparisons with a pattern is called: case fanout if test...
Linux Essentials
Given the following script: Which of the following are true...
Given the following script: while [ ! –f /tmp/foo ]; do echo –n “.” process_data > /tmp/foo done...
The number of users logged in is in a variable called USERS. How...
The number of users logged in is in a variable called USERS. How would you test to see if 5 users...
The if command looks for what exit code to consider a condition...
The if command looks for what exit code to consider a condition to be true? 10 255 0 1 8
How would you finish your script with an exit code of 42?
How would you finish your script with an exit code of 42? return 42 $?=42 CODE=42 exit 42 break 42
What information is held inside $?
What information is held inside $? The current process id The number of arguments passed to the...
Which shell command accepts input from the user’s keyboard?
Which shell command accepts input from the user’s keyboard? echo $1 read input gets
What is the correct way to save the current directory to a...
What is the correct way to save the current directory to a variable? A=`pwd` A=pwd A=cwd pwd $A pwd...
What is the correct way to assign the word “Hello” to a variable?
What is the correct way to assign the word “Hello” to a variable? $A=”Hello” echo “Hello” > A...
Given the following script that is run through. When will “I am...
Given the following script that is run through ./test.sh hello goodbye: if [ -f $2 ]; then echo...
Given the following part of a script: What is the meaning of $1?
Given the following part of a script: if [ -f $1 ]; then echo “I am here” fi What is the meaning of...
Which of the following are correct about for and while loops...
Which of the following are correct about for and while loops? (choose two) for loops operate over a...
What does this shell script do?
What does this shell script do? FOO= /tmp/ foo if [ ! –d $FOO ]; then mkdir $FOO fi Creates...
Most of nano’s commands take the form of:
Most of nano’s commands take the form of: Control and another character Alt and another character...
Which are appropriate editors for writing shell scripts? (choose...
Which are appropriate editors for writing shell scripts? (choose two) /bin/bash vi LibreOffice...