Bug 53668 - Problem when displaying date in a function
Summary: Problem when displaying date in a function
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash   
(Show other bugs)
Version: 7.1
Hardware: i686 Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-09-14 13:39 UTC by maixent.vothanh
Modified: 2007-04-18 16:37 UTC (History)
0 users

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

Attachments (Terms of Use)

Description maixent.vothanh 2001-09-14 13:39:29 UTC
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 09:08:44 UTC
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.