[root@iz2zecibr4bozfdvtbnvfkz test]# date -d '1 day ago' +%m
04
[root@iz2zecibr4bozfdvtbnvfkz test]# date -d '1 day ago' +%m|sed -r 's/0+([1-9])/\1/g'
4
[root@iz2zecibr4bozfdvtbnvfkz test]# date -d '1 day ago' +%m|sed s'/^0//'
4
最淡的墨水也胜过最强的记忆.
[root@iz2zecibr4bozfdvtbnvfkz test]# date -d '1 day ago' +%m
04
[root@iz2zecibr4bozfdvtbnvfkz test]# date -d '1 day ago' +%m|sed -r 's/0+([1-9])/\1/g'
4
[root@iz2zecibr4bozfdvtbnvfkz test]# date -d '1 day ago' +%m|sed s'/^0//'
4
Be First to Comment