Think before you speak, read before you think.

Tag: shell script

  • shell 毕业倒计时

    参考鸟哥linux私房菜p389 #!/bin/bash #for use: #author: jpuyy date  jpuyy.com stubusy@gmail.com #modified by xx at date #version: #history: #relate on: PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo “count down script” echo “how many time to graduate” read -p “please input your graduate time format like 20120620:” date2 date_d=$(echo $date2 | grep ‘[0-9]\{8\}’) if [ “$date_d” == “” ]; then    …