#! /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