echo command:- 
Is used to output text to the console
 
Which of the following are correct about for and while loops?
- 
for loops operate over a fixed list of items
 - 
while loops have a test each cycle to determine if it should run again
 
Given the following part of a script:
if [ -f $1 ]; then
    echo I am here
fi
What is the meaning of $1?- 
It is the first argument passed to the script
 
What is the correct way to assign the word "Hello" to a variable?
- 
A=Hello
 
Which shell command accepts input from the users keyboard?
- 
read
 
What information is held inside 
$? ?- 
The previous commands exit code
 
The 
if command looks for what exit code to consider a condition to be true?- 
0
 
A conditional that lets you make multiple comparisons with a pattern is called:
- 
case
 
What is the meaning of 
$(( $i + 1)) ?- 
1 will be added to the i variable
 
How would you write a test that says if /tmp/foo is a directory or USERS is greater than 5?
- 
test d /tmp/foo o $USERS gt 5
 
0 comments:
Posting Komentar