📜  当年 bash - Shell-Bash 代码示例

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

代码示例1
date +"%Y"
date +"%y"
 
## Store to a shell variable ##
mydate=$(date +'%Y')
myyear=`date +'%Y'`
echo "Year = $mydate"
echo "Year = $myyear"