📄 ex-11-02_while.sh
字号:
#!/bin/sh# Chapter 11 - The while loop# This example demonstrates the use of nested while loops# You may need to change the line:## /bin/echo "$y \c" ## to## /bin/echo -n "$y "## on your machine in order to get the same output as shown# in the bookx=0while [ "$x" -lt 10 ] ; # this is loop1do y="$x" while [ "$y" -ge 0 ] ; # this is loop2 do /bin/echo "$y \c" y=`echo "$y - 1" | bc` done echo x=`echo "$x + 1" | bc`done
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -