-1

What does it mean in bash when a quoted string is preceded by dollar character?

Example:

echo $"foo"
ardabro
  • 1,686
  • 15
  • 28

1 Answers1

1

This makes the string subject to translation. From the man page:

A double-quoted string preceded by a dollar sign ($"string") will cause the string to be translated according to the current locale. If the current locale is C or POSIX, the dollar sign is ignored. If the string is translated and replaced, the replacement is double-quoted.

chepner
  • 446,329
  • 63
  • 468
  • 610