如何获得一年中的壳? [英] how to get day of the year in shell?
本文介绍了如何获得一年中的壳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在外壳中获取一年中的哪一天?
date '+%V'
将给我一年中的星期,今天是15;但我需要找到一年中的哪一天!
date '+%V'
will give me the week of the year, which is 15 for today; but I need to find the day of the year!
推荐答案
来自 coreutils日期手册:
%j day of year (001..366)
这篇关于如何获得一年中的壳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文