From Bugzilla Helper: User-Agent: Mozilla/4.75 [fr] (X11; U; Linux 2.2.16-22 i686) Description of problem: Used in a crontab date seemed to behave in different ways. I'm using this : jour=`date | awk '{print $1}'` echo "hello" > "$jour"_example.txt I'm waiting french types like lun, mar, mer,...etc. For instance : ven_example.txt This is rolling OK when I'm launching my script directly, but when I'm lauching it by the crontab I'm getting Fri_example.txt for instance. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. make a simple script with th lines described before 2. launch it manually 3.Compare the result launching the script with crontab Actual Results: 1. Manually the result is a file named ven_example.txt 2. With the crontab, its a file named Fri_example.txt Expected Results: The same result I obtain manually than with the crontab Additional info: I'm using French environment
This is because cron does not set the LANG environment variable. Add source /etc/sysconfig/i18n to your script, or add LANG=fr_FR to /etc/crontab.