-5

At the moment I call date this way:

  date '+%Y %m %d' 
  # ==> 2017 12 01

How should I adjust it so that it return a month in the 3-char format? Like this:

 date '+%Y %m %d'
 # ==> 2017 dec 01
Joddy
  • 69
  • 5

1 Answers1

0

Try: date '+%Y %b %d' | tr A-Z a-z

David Schwartz
  • 31,215
  • 2
  • 53
  • 82
  • Or you may use the translate command (`tr`) with character sets like `tr '[:upper:]' '[:lower:]'`. See `man tr` for more information. – U880D Aug 08 '18 at 10:56