New answers tagged locale
Is it possible to limit the set of English locales on a system? Another way to ensure you only have the English version of of some documentation is to remove non-English from the man pages: sudo rm -rf /usr/share/man/?? sudo rm -rf /usr/share/man/??_* Also see Reducing the size of the Debian Installation Footprint on the Debian wiki.
Inside the script, simply export LC_ALL=C.UTF8 at the beginning (just after the shebang line, if any). Then, all commands executed by the script will inherit LC_ALL. If you need part of your script to be immune to locale changes, but part to respect the locale (for instance, if you are to calculate and then print some values), you might need to unset ...
Some programs react to environment variables by selecting e.g. messages and formats at startup. This is hard work, not all do. Some also offer commands to change this at runtime. You can't change environment variables for a running process, and if you could, it is very unlikely that the program monitors if they change and reconfigures.
The problem is the truncation of the locale file. Check: http://bleachbit.sourceforge.net/forum/linux-fedora-core-15-usrliblocalelocale-archive-still-large-after-removing-all-one-locale So, if you just copy the locale file over the template file and run build-locale-archive, everything works: cp -f /usr/lib/locale/locale-archive ...
According to the locale(1) man page it can - you'll need to set the LOCPATH environment variable to point to the directory of your choosing (at least on some Linux systems). Note, that there are several sources of locale(1) man page - I have been able to locate at least two referring to Linux. I suppose you'll need to try to see whether this works on your ...
I had a similar case, but needed the login date in my custom format. This works for me: date -d "`last -F | head -n1 | sed -r 's/.*\.[0-9]+\s+//' | sed -r 's/\s(still|-).*//'`" +"%F_%R"
Top 50 recent answers are included