[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[OT] bashism (was: Re: Locale testing)



On Saturday 06 December 2008, Tzafrir Cohen <tzafrir@cohens.org.il> wrote 
about 'Re: Locale testing':
>Off-topic:
>
>On Sat, Dec 06, 2008 at 10:06:36PM +0200, Dotan Cohen wrote:
>> #!/bin/bash
>> export LC_ALL="";export LC_TIME="en_DK.utf8";/usr/bin/thunderbird "$@"
>
>This is bashism.

Yes.

>#!/bin/sh
>LC_ALL="" LC_TIME="en_DK.utf8" /usr/bin/thunderbird "$@"
>
>Or even better:
>
>#!/bin/sh
>LC_ALL="" LC_TIME="en_DK.utf8" exec /usr/bin/thunderbird "$@"

Well, that's changing more than the bash-ism.

The bashism here is:
export VAR=<value>

For maximum compatibility, that needs to be:
VAR=<value>; export VAR

Standard "export" doesn't handle setting the value of the variable, it 
*only* marks the variable as exported.
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: