I have found solutions for GNU date
, but not for BSD date
. I would rather not make an if
, etc. before I know if there's a built in way.
1 Answer
To convert October
to 10
, for example (I have Swedish locale)
date -jf %B Oktober '+%m'
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityTo convert October
to 10
, for example (I have Swedish locale)
date -jf %B Oktober '+%m'