In bash, are there any differences between opting to use ( ... )
or { ... }
, as in my test case, both of these product the same expected result:
# using round brackets
(
echo 'hello'
echo 'world'
) | rev
# using squiggly brackets
{
echo 'hello'
echo 'world'
} | rev
# result:
olleh
dlrow
Perhaps this test case in a condition where they are the same, however are factors where I would opt for one syntax over the other?