# program: lists big planets
for planet in "Mercury 36" "Venus 67" "Earth 93" "Mars 142" "jupiter 483"
do
set -- $planet
echo "$1 $2,000,000 miles from the sun."
done
這裏“set -- $planet”重新指定了命令行參數。將planet的內容作爲命令行參數。
而且這裏planet是每個雙引號括起來的字符串而不是像
for planet in "Mercury Venus Earth Mars Jupiter"