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 ``'
2

1 Answer 1

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.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .