NOW = $(data + "%Y-%m-%d-%H-%M-%S")
DIR = /export/backup
function exportData(){
exportCmd = "/export/mongodb/bin/mongodump"
$exportCmd -h 127.0.0.1 -u "admin" -p "admin" -d test --gzip -o $DIR/test_$NOW
}
echo export data from test //输出提示信息
exportData //调用function