Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I found examples of different quoting for curly braces for find, but I could not find an explanation. The possible choices are:
1. {}
2. '{}'
3. "{}"
And they all seem to work fine. Is there a difference between them?

share|improve this question

marked as duplicate by Gilles, Stéphane Gimenez, uther, jasonwryan, manatwork Mar 22 '13 at 6:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

The quoting would only be required if {} was interpreted by the shell. No modern shell (that I am aware of) interprets {} any way other than literally. In bash and ksh93, {} indicates a brace expansion, but since {} is an empty brace expansion, it isn't interpreted. In POSIX shell, it has no meaning, and so is also literal. I am not aware of it having any special meaning in the original Bourne shell, either.

Most likely this quoting is just people being cautious, and assuming { or } (or the two combined) may be interpreted as metacharacters by certain shells. In practise, I can't think of any shells that assign special meaning to it.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.