ex26a.sh
来自「Shall高级编程」· Shell 代码 · 共 22 行
SH
22 行
#!/bin/bashvar1=unsetprevious=$var1while echo "previous-variable = $previous" echo previous=$var1 [ "$var1" != end ] # Keeps track of what $var1 was previously. # Four conditions on "while", but only last one controls loop. # The *last* exit status is the one that counts.doecho "Input variable #1 (end to exit) " read var1 echo "variable #1 = $var1"done # Try to figure out how this all works.# It's a wee bit tricky.exit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?