Shell 获取当前时间

#! /bin/bash
time=`date '+%Y-%m-%d %H:%M:%S'`
# echo $time
sql='SELECT `username`, `password` FROM `user` WHERE `expire_date` < "'${time}'" and `remaining_seconds` > 0;'
echo $sql

 

posted @ 2014-08-20 18:02  Debm.Zhang  阅读(361)  评论(0编辑  收藏  举报