📜  当前日期 bash - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:27.342000             🧑  作者: Mango

代码示例2
date +'FORMAT'
 
### mm/dd/yyyy ###
date +'%m/%d/%Y'
 
## Time in 12 hr format ###
date +'%r'
 
## backup dir format ##
backup_dir=$(date +'%m/%d/%Y')
echo "Backup dir for today: /nas04/backups/${backup_dir}"