生成以當前時間命名的文件對於當今兩大主流系統都十分有用
Windows BAT批處理文件
@echo off
set time_hh=%time:~
if /i %time_hh% LSS
set filename=%date:~
echo test >> %filename%
Linux Shell 腳本
#!/bin/sh
echo test >> $(date
From:http://tw.wingwit.com/Article/Common/201311/5862.html