在 Windows、Linux 操作系统,分别利用BAT批处理文件和Shell脚本,生成类似“20110228_082905.txt”以“年月日_时分秒”命名的文件。

  Windows BAT批处理文件:
@echo off
set time_hh=%time:~0,2%
if /i %time_hh% LSS 10 (set time_hh=0%time:~1,1%)
set filename=%date:~,4%%date:~5,2%%date:~8,2%_%time_hh%%time:~3,2%%time:~6,2%
echo test >> %filename%.txt


  Linux Shell 脚本:
#!/bin/sh
echo test >> $(date -d "today" +"%Y%m%d_%H%M%S").txt






技术大类 » PHP/JS/Shell | 评论(323) | 引用(4) | 阅读(150564)
karthick Email Homepage
2020-12-8 21:52
It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.
kathiresan Email Homepage
2020-12-15 00:36
Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
aravind Email Homepage
2021-3-27 22:16
Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might be interested in hearing.
kuam Email Homepage
2021-5-22 23:23
My rather long internet look up has at the end of the day been compensated with pleasant insight to talk about with my family and friends.
rishith Email Homepage
2021-5-23 00:22
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
cibi Email Homepage
2021-5-24 12:47
Thank you for the informationAutomation Anywhere Course in Chennaihttps://www.softlogicsys.in/automation-anywhere-training-in-chennai/
nsoumyaranjan Email Homepage
2021-5-24 13:34
Techniques that were not productive, I thought my life was dI wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting one.
nsoumyaranjan Email Homepage
2021-5-24 13:35
I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
mohammedmu Email Homepage
2021-5-29 01:18
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
pmohana Email Homepage
2021-6-19 01:55
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
pmohana Email Homepage
2021-6-20 00:04
Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us.
pmohana Email Homepage
2021-6-27 02:06
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
shyam Email Homepage
2021-7-31 14:03
Softlogic Offer the best Web Designing training and placement in Chennai with well defined training modules and course sessions.
Habeeb Email Homepage
2021-12-7 00:49
And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
Sabi Email Homepage
2021-12-7 00:54
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site
pmohana Email Homepage
2021-12-11 22:14
My friends and I were going through the nice, helpful tips from the blog then suddenly came up with an awful suspicion I never expressed respect to the website owner for those secrets.
Kathar Email Homepage
2022-1-5 13:37
wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
Safi Email Homepage
2022-1-5 15:25
I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
Rajesndran Email Homepage
2022-1-5 22:03
Full of a lot of fun for me personally and my office colleagues to search your blog a minimum of thrice in a week to see the new guidance you have got.
Rasith Email Homepage
2022-2-2 20:20
Nice Post.
分页: 15/17 第一页 上页 10 11 12 13 14 15 16 17 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]