4a2xHlraieOiMAJd5KIO91 changeset

Changesetd4a3a3a8f12d (b)
ParentNone (a)
ab
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
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- Revision None
+++ Revision d4a3a3a8f12d
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Listing the planets and the Pluto thing
+
+for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto
+do
+ echo $planet # Each planet on a separate line.
+done
+
+echo
+
+for planet in "Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto"
+ # All planets on same line.
+ # Entire 'list' enclosed in quotes creates a single variable.
+ # Why? Whitespace incorporated into the variable.
+do
+ echo $planet
+done
+
+exit 0