Bash+crontab output is in different language
Hi!
I am running this script, that sets the begining and end of a period: Code:
#!/bin/bash But, when I run the script through crontab (obviously with the same user), the output is created in english!, eg 01-APR-2011. My locale are set as follows, Code:
LANG=es_ES.UTF-8 Thanks! |
Hi
Cron doesn't read the files where the locale is set. Why not simply copy all that locale stuff to the beginning of your script? If a script needs a specific locale to work properly, I think the script should set it, and not rely on some other system settings. |
Quote:
I am afraid it didn't work: adding my locale into the script doesn't change the output, which is still in english.. :( |
Hi
I think you will need to use export in the script. I just made this little script and put it in cron: Code:
#!/bin/bash |
That was great: thanks a lot!
|
All times are GMT -5. The time now is 07:18 PM. |