[Top][All Lists]

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

Re: Expansion of $"foo" is "foo", not "$foo"

From: Chet Ramey
Subject: Re: Expansion of $"foo" is "foo", not "$foo"
Date: Mon, 21 May 2001 16:04:38 -0400

> Machine Type: sparc-sun-solaris2.7
> Bash Version: 2.05
> Patch Level: 0
> Release Status: release
> Description:
>       I haven't read the standard, but Solaris /usr/xpg4/bin/sh
>       will output "$foo", not "foo" as the result of the command
>       echo $"foo".  That is what I would expect intuitively, too.
>       (I noticed this due to a typo in Red Hat 7.1's script
>       /etc/init.d/xfs, which had no visible effect.)

Read the QUOTING section of the bash manual page.  It says, in part:

A double-quoted string preceded by a dollar sign (\fB$\fP) will cause
the string to be translated according to the current locale.
If the current locale is \fBC\fP or \fBPOSIX\fP, the dollar sign
is ignored.
If the string is translated and replaced, the replacement is

This is also covered in item 1 in the COMPAT file.

``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]