Changes

Jump to: navigation, search

ULI101 Week 10

11 bytes removed, 21:34, 31 August 2017
no edit summary
* <code>$#</code> represents the number of parameters (not including the script name)
== <code>echo</code> command ==
* Displays messages to the terminal followed by a newline. Use the <code>-n</code> option to suppress the default newline.
* Arguments are usually double quoted.
== <code>read</code> command ==
* The <code>read</code> command allows obtaining user input and storing it in a variable. Everything is captured until the Enter key is pressed.
echo Hello $name
</source>
 == Using Logic ==
The purpose of the if statement is execute a command or commands based on a condition. The condition is evaluated by a test command, represented below by a pair of square brackets
</source>
== <code>test</code> Command ==
The <code>test</code> command can be used in two ways:
Check <code>man test</code> for more details
== Using Loops ==
A for loop is a very effective way to repeat the same command(s) for several arguments such as file names. The syntax and example of for command is shown below:
221
edits

Navigation menu