-1

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

Example:

echo $"foo"
ardabro
  • 1,907
  • 16
  • 31

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
  • 497,756
  • 71
  • 530
  • 681