I have the following :
x=/
find ${x} *
Now this is similar to find / *
What is the significance of $
and {}
in find ${x} *
$...
denotes a variable, and when followed by curly parenthesis ${...}
, you provide a boundary for the variable so you can run it next to a string literal like:
$ FLAVOUR="cheese"
$ echo "I like ${FLAVOUR}y crisps"
I like cheesey crisps
Without the parenthesis, you would see:
$ echo "I like $FLAVOURy crisps"
I like crisps
Which, while true, isn't what you really wanted.
Why it's used in your example is beyond me. It isn't required.
Curly braces are also used for bash array lookups when you want to specify the index, but this has nothing to do with your example:
$ arr=(*)
$ echo ${arr[3]} # print third item; 1-indexed? blimey.
jumbo-small.jpg
$echo ${arr[@]} # print whole array
glyphicons-halflings.png glyphicons-halflings-white.png jumbo.jpg jumbo-small.jpg