How does the leading dollar sign affect single quotes in Bash?

It causes escape sequences to be interpreted.

$ echo $'Name\tAge\nBob\t24\nMary\t36'
Name    Age
Bob     24
Mary    36

After those sequences are expanded, the result is single-quoted, as if the dollar sign had not been present.

Leave a Comment