dotfiles

Dotfiles for my OpenBSD environment.
git clone https://git.mtkn.jp/dotfiles
Log | Files | Refs

mn (504B)


      1 #!/bin/sh -u
      2 # convert month name to month number
      3 cat | sed -E '
      4 	s/[Jj][Aa][Nn]([Uu][Aa][Rr][Yy])?/01/g
      5 	s/[Ff][Ee][Bb]([Rr][Uu][Aa][Rr][Yy])?/02/g
      6 	s/[Mm][Aa][Rr]([Cc][Hh])?/03/g
      7 	s/[Aa][Pp][Rr]([Ii][Ll])?/04/g
      8 	s/[Mm][Aa][Yy]/05/g
      9 	s/[Jj][Uu][Nn]([Ee])?/06/g
     10 	s/[Jj][Uu][Ll]([Yy])?/07/g
     11 	s/[Aa][Uu][Gg]([Uu][Ss][Tt])?/08/g
     12 	s/[Ss][Ee][Pp]([Tt][Ee][Mm][Bb][Ee][Rr])?/09/g
     13 	s/[Oo][Cc][Tt]([Oo][Bb][Ee][Rr])?/10/g
     14 	s/[Nn][Oo][Vv]([Ee][Mm][Bb][Ee][Rr])?/11/g
     15 	s/[Dd][Ee][Cc]([Ee][Mm][Bb][Ee][Rr])?/12/g
     16 '