From ef1d4d3519017008bb25b97330e99a55aa93c2bb Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Mon, 16 Sep 2019 09:41:15 -0500 Subject: [PATCH] Add Figure Out The Week Of The Year From The Terminal as a unix til --- README.md | 3 ++- ...-out-the-week-of-the-year-from-the-terminal.md | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 unix/figure-out-the-week-of-the-year-from-the-terminal.md diff --git a/README.md b/README.md index d2311c4..7a23bdb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_844 TILs and counting..._ +_845 TILs and counting..._ --- @@ -751,6 +751,7 @@ _844 TILs and counting..._ - [Display Free Disk Space](unix/display-free-disk-space.md) - [Do Not Overwrite Existing Files](unix/do-not-overwrite-existing-files.md) - [Exclude A Directory With Find](unix/exclude-a-directory-with-find.md) +- [Figure Out The Week Of The Year From The Terminal](unix/figure-out-the-week-of-the-year-from-the-terminal.md) - [File Type Info With File](unix/file-type-info-with-file.md) - [Find Files With fd](unix/find-files-with-fd.md) - [Find Newer Files](unix/find-newer-files.md) diff --git a/unix/figure-out-the-week-of-the-year-from-the-terminal.md b/unix/figure-out-the-week-of-the-year-from-the-terminal.md new file mode 100644 index 0000000..cd5f01e --- /dev/null +++ b/unix/figure-out-the-week-of-the-year-from-the-terminal.md @@ -0,0 +1,15 @@ +# Figure Out The Week Of The Year From The Terminal + +Want to know what week of the year we are currently in? You can use the +[`date`](http://man7.org/linux/man-pages/man1/date.1.html) utility to figure it +out. + +```bash +$ date +%V +``` + +The `%V` is a formatting directive with this description: + +> ISO week number, with Monday as first day of week (01..53) + +[source](https://stackoverflow.com/questions/3237882/get-week-of-year-from-day-of-year)