suggestion (was Re: 1.7.7: Localization does not follow the language of the OS)

Christopher Faylor
Thu Jan 13 15:49:00 GMT 2011

On Thu, Jan 13, 2011 at 08:07:20AM -0500, Buchbinder, Barry (NIH/NIAID) [E] wrote:
>Matthias Andree sent the following at Wednesday, January 12, 2011 8:55 AM
>>Am 12.01.2011 11:55, schrieb Corinna Vinschen:
>>>> export LANG="$(locale -uU)"    # (or -sU for system default locale)
>>> It's just another way to express the same.  Backticks are not obsolete.
>>> The backtick style is exactly as much POSIX as the $() style.  See
>>> ml#tag_18
>>> Other than that, this isn't a mailing list about programming style.
>>Try mixing backticks with quoting and blanks, or try nesting them,
>>and then you'll know it's not about style but pretty much about
>>functionality, hence, obsolete (whether it's labeled as such in the
>>standard or not - there is a better alternative).
>>If it were equivalent, I hadn't posted this. It isn't.
>Actually, I would argue that sometimes they are equivalent and sometimes
>they are not.  Think of it like physics.  Newtonian mechanics and
>relativity are different.  Relativity always gives the correct answer and
>Newtonian mechanics doesn't always do so, but we still use the older form
>when it does.
>So if one wants to use something that always works, use $().  But when
>`command` works, there is no reason not to use it if one wants to.
>Personally, I still use backticks fairly often.
>  (1) On my keyboard, they are significantly easier to type than $().
>  (2) It is a habit; $() did not exist when I started to learn scripting.

Big ditto.

I remember going to great lengths to work around ``'s lack of
nestability back in the old days and cursing the shell syntax for not
providing something better.  Now that there is something better I always
forget to use it.


More information about the Cygwin-talk mailing list