GB
| BIG5
首頁
> 編程技術 > 源碼天堂 > 正文
Shell源碼:用命令find產生一個以當日日期為綴的文件
本文出自:news://news.freesoft.cei.gov.cn/chinese.com.linux 作者: 宮敏 (2001-08-24 15:00:01)
file=`date '+%m%d'` | touch todayis.$file
或者做一個shell腳本:
#!/usr/bin/sh
file=`date '+%M%d'`
touch todayis.$file
exit 0
注意定義file變量中的“`”不是“ '”,而是左上角數字鍵1傍邊那個(左單引號)。 (
http://www.fanqiang.com
)
進入【
UNIX論壇
】
相關文章
C源碼:通過IP地址查找主機名 findip.c
(2001-10-14 13:05:00)
Shell源碼:用命令find產生一個以當日日期為綴的文件
(2001-08-24 15:00:01)
Shell源碼:find查找日期為某一天的文件
(2001-08-24 12:00:00)
解決libxxxx.so : not find 找不到的問題
(2001-06-29 11:00:00)
如何用 find 命令進行靈活查找
(2001-06-29 10:08:00)
Linux 指令篇:檔案目錄管理--find
(2001-04-30 14:03:28)
技巧:利用Find命令改變所有權
(2001-04-15 21:32:32)
★ 樊強制作 歡迎分享 ★