Bug 53668 - Problem when displaying date in a function
Summary: Problem when displaying date in a function
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2001-09-14 13:39:33 UTC
Embargoed:


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 :
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

Comment 1 Bernhard Rosenkraenzer 2001-09-18 09:08:44 UTC
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.




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