码迷,mamicode.com
首页 > 其他好文 > 详细

shell脚本获取当前时间

时间:2014-08-26 11:17:15      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:blog   ar   art   div   log   时间   c   har   as   

举个栗子

#! /bin/bash
date1=`date +%Y-%m-%d`    #这里用反引号引起来,反引号在键盘左上角第一个哟
time1=`date +%H:%M:%S`
echo "start at $date1 $time1"

  

shell脚本获取当前时间

标签:blog   ar   art   div   log   时间   c   har   as   

原文地址:http://www.cnblogs.com/joewu/p/3936719.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!