Bug 53668 - Problem when displaying date in a function
Problem when displaying date in a function
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-09-14 09:39 EDT by maixent.vothanh
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-14 09:39:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description maixent.vothanh 2001-09-14 09:39:29 EDT
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 :
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:

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
Comment 1 Bernhard Rosenkraenzer 2001-09-18 05:08:44 EDT
This is because cron does not set the LANG environment variable.

source /etc/sysconfig/i18n

to your script, or add LANG=fr_FR to /etc/crontab.

Note You need to log in before you can comment on or make changes to this bug.