linux关于日期天数的计算: 1.cal 2 2019 | awk 'NF{ out=$NF;}END{print out}' 2.echo $(cal 2 2019) | awk '{print $NF}'