天天看點

Shell學習筆記---date_pratice.sh

聲明:本文僅作學習研究使用,多數語句都是為了介紹文法而構造的。

一個簡單的date用法練習腳本!!!!!! 

#!/bin/bash 

#filename:date_practice.sh 

# datetime:2010_12_23 18:32 

#discription:practise of using command date 

echo "the number of day since the year's begining is `date +%j`." 

echo "the number of seconds elapsed since 01/01/1970 is `date +%s`." 

prefix=temp 

suffix=$(date +%s) 

filename=$prefix.$suffix 

echo $filename 

exit 0 

如有錯誤,歡迎指正 

郵箱:[email protected] 

作者:czmmiao 原文位址:http://czmmiao.iteye.com/blog/911376