4a2xHlraieOiMAJd5KIO91 changeset
| Changeset | d4a3a3a8f12d (b) |
|---|---|
| Parent | None (a) |
| a | b | ||
|---|---|---|---|
| 0 | + | #!/bin/bash | |
| 0 | + | # Listing the planets and the Pluto thing | |
| 0 | + | ||
| 0 | + | for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto | |
| 0 | + | do | |
| 0 | + | echo $planet # Each planet on a separate line. | |
| 0 | + | done | |
| 0 | + | ||
| 0 | + | echo | |
| 0 | + | ||
| 0 | + | for planet in "Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto" | |
| 0 | + | # All planets on same line. | |
| 0 | + | # Entire 'list' enclosed in quotes creates a single variable. | |
| 0 | + | # Why? Whitespace incorporated into the variable. | |
| 0 | + | do | |
| 0 | + | echo $planet | |
| 0 | + | done | |
| 0 | + | ||
| 0 | + | exit 0 | |
| ... | |||
|
|