Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在运行以下脚本:
#!/bin/ksh ./clear_old ./rooms_xls.pl 2/23/09 cd doors ./doors_xls.pl 2/23/09
如何根据系统/服务器时间将日期设为今天的日期?
这应该可以正常工作(并且几乎符合您的格式):
#!/bin/ksh ./clear_old ./rooms_xls.pl `date +%D` cd doors ./doors_xls.pl `date +%D`
$(date)
作品
在 date 命令中使用反引号:
./rooms_xls.pl `date +%m/%d/%Y`