**Second, run it.** We execute the script from the command line just like any other command like `ls` or `date`. The script
name is the command, and you need to precede it with a './' when you call it:
`./myscript.sh # Outputs "Hi. I'm your new favorite bash script." (This part is a comment!)`
## Conditionals
Sometimes you want your script to do something only if something else is true. For example, print a message only if a value is
below a certain limit. Here's an example of using `if` to do that:
```
#!/bin/bash
count=1 # Create a variable named count and set it to 1
if [[ $count -lt 11 ]]; then # This is an if block (or conditional). Test to see if $count is 10 or less. If it is, execute the instructions inside the block.
echo "$count is 10 or less" # This will print, because count = 1.
fi # Every if ends with fi
```
Similarly, we can arrange the script so it executes an instruction only while something is true. We'll change the code so that
the value of the count variable changes:
```
#!/bin/bash
count=1 # Create a variable named count and set it to 1
while [[ $count -lt 11 ]]; do # This is an if block (or conditional). Test to see if $count is 10 or less. If it is, execute the instructions inside the block.
echo "$count is 10 or less" # This will print as long as count <= 10.
count=$((count+1)) # Increment count
done # Every while ends with done
```
The output of this version of myscript.sh will look like this:
```
"1 is 10 or less"
"2 is 10 or less"
"3 is 10 or less"
"4 is 10 or less"
"5 is 10 or less"
"6 is 10 or less"
"7 is 10 or less"
"8 is 10 or less"
"9 is 10 or less"
"10 is 10 or less"
```
## Real World Scripts
These examples aren't terribly useful, but the principles are. Using `while`, `if`, and any command you might otherwise type
manually, you can create scripts that do valuable work.