发布时间:2013-01-31 10:40:46
一般我们写多分支选择语句 都会用case $1 in……;;esac偶然发现 select写多分支语句其实也很方便eg:#!/bin/bashecho "what is your favourite OS?"select var in "Windows" "Linux" "MAC"doif [ $var = Windows ] then Your favourit.........【阅读全文】
发布时间:2012-12-27 13:55:05
#!/bin/bash# This script run at 00:00# The Nginx logs pathlogs_path="/data/logs"mkdir -p $logs_path/`date -d "yesterday" +"%Y"`/`date -d "yesterday" +"%m"`/mv $logs_path/game.log $logs_path/`date -d "yesterday" +"%Y"`/`date -d "yesterday" +"%m"`/game_`date -d "yesterday" +"%Y%m%d"`.logkill -USR1 `ca......【阅读全文】