14

When bash is reporting a syntax error, it encapsulates the text which has raised the syntax error both with grave accent and with an apostrophe, like this: `...'. Any idea why?

Here's an example:

$ bash -c "echo error()"
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `echo error()'

This is not very common; however, I am just curious, this is not a real problem.

Edit: this gets weirder with obscure messages like this one:

-bash: unexpected EOF while looking for matching ``'
Braiam
  • 35,991
Bach
  • 849

1 Answers1

7

In certain fonts, those quotation marks will appear as opposing pairs of curled single quotes. It's passé in today's Unicode world, but the code and practices that produced such quoting derive from a time before Unicode, or before its widespread availability.

Warren Young
  • 72,032