Purchase Solution

Shell scripting: Loops and Redirection

Not what you're looking for?

Ask Custom Question

Give brief answers for the following Bash questions.

1) Does filename generation occur on variable assignment?

2) In the traditional Bourne Shell, does a sub-shell get created when there is I/O redirection to a loop?

3) Will the following command always correctly loop through each of the positional parameters?

for I in "$*"
do
echo $I
done

4) Will the following loop always execute only once?

for I in "$@"
do
echo $I
done

5) Will the following command sometimes execute once?

for I do echo $I done

6) Does a while loop always execute at least once?

Purchase this Solution

Solution Summary

Solution also gives reasons/examples (except in case of 2nd question).

Solution Preview

1) It can happen, depending upon the right hand side of the assignment. For example, an assignment like following will create a file during the variable ...

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Networking Questions

This quiz consists of some basic networking questions.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.