months
来自「UNIX+shell范例精解(第4版)代码」· 代码 · 共 27 行
TXT
27 行
#!/bin/sh# Scriptname: monthsfor month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Decdo for week in 1 2 3 4 do echo -n "Processing the month of $month. Okay? " read ans if [ "$ans" = n -o -z "$ans" ] then continue 2 else echo -n "Process week $week of $month? " read ans if [ "$ans" = n -o -z "$ans" ] then continue else echo "Now processing week $week of $month." sleep 1 # Commands go here echo "Done processing..." fi fi donedone
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?