There’s some more about the differences between BSD and GNU date in the original. You’re right, though; using external dependencies makes this less portable.
I used the nested substitution to show another crazy thing you can do within a substitution. Piping the result from the date command through tr is probably easier to remember, so I'll add a quick note about that. Thanks!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Ben, 👋
Thanks for your kind words!
There’s some more about the differences between BSD and GNU date in the original. You’re right, though; using external dependencies makes this less portable.
I used the nested substitution to show another crazy thing you can do within a substitution. Piping the result from the
date
command throughtr
is probably easier to remember, so I'll add a quick note about that. Thanks!