Bash: Both date "%b" and date "%h" (and of course) date "%B" gives full name of month?
I've tested it and the problem seems to be the norwegian localization:
$ LC_ALL=C date +%bApr$ LC_ALL=nn_NO.UTF-8 date +%bapril
therefore when you try to parse the log file you should set the LC_ALL
environment variable to C
, i.e.
LC_ALL=C command
or
export LC_ALL=C# your script code hereexport -n LC_ALL
For more informations on locales setting see the Locale page on Ubuntu wiki.