Shell脚本标准

#!/bin/bash
#Usage:
#      ./shell.sh dbname user passwd
#------------------------------------------------------
#Filename:              shell.sh
#Revision:              1.0
#Date:                  2017/04/21
#Author:                Jim
#Description:     The Example of a shell script
#Notes:
#------------------------------------------------------
Usage="Usage: $0 dbname user passwd"
[ $# -ne 3 ] && echo "${Usage}" && exit -1

#define alias time and bring into effect
alias dt='date +%Y-%m-%d" "%H:%M:%S'
shopt -s expand_aliases

 

posted @ 2017-04-21 14:19  Blue眼泪2016  阅读(490)  评论(0编辑  收藏  举报