seven="( . 1 . 1 . 1)"
octal="zero one two three four five six seven"
for n in $octal
do
echo $n
done
当它达到七时,它回声“七”。如何让它回显( . 1 . 1 . 1)
的字符串$seven
?
答案 0 :(得分:4)
seven="( . 1 . 1 . 1)"
octal="zero one two three four five six seven"
for n in $octal
do
echo "${!n:-$n}"
done