?? ex53.sh
字號:
#!/bin/bash# Using "seq"echofor a in `seq 80` # or for a in $( seq 80 )# Same as for a in 1 2 3 4 5 ... 80 (saves much typing!).# May also use 'jot' (if present on system).do echo -n "$a "done # 1 2 3 4 5 ... 80# Example of using the output of a command to generate # the [list] in a "for" loop.echo; echoCOUNT=80 # Yes, 'seq' may also take a replaceable parameter.for a in `seq $COUNT` # or for a in $( seq $COUNT )do echo -n "$a "done # 1 2 3 4 5 ... 80echo; echoBEGIN=75END=80for a in `seq $BEGIN $END`# Giving "seq" two arguments starts the count at the first one,#+ and continues until it reaches the second.do echo -n "$a "done # 75 76 77 78 79 80echo; echoBEGIN=45INTERVAL=5END=80for a in `seq $BEGIN $INTERVAL $END`# Giving "seq" three arguments starts the count at the first one,#+ uses the second for a step interval,#+ and continues until it reaches the third.do echo -n "$a "done # 45 50 55 60 65 70 75 80echo; echoexit 0
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -