📜  在 bash 中回显日期 - Shell-Bash 代码示例

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

代码示例3
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}"