I just tried :
find . -name "*.[hc]" -print
and
find . -name "*.[hc]"
But both output the same ,is -print useless now?
|
feedback
|
This question came from our site for system administrators and desktop support professionals.
|
Looking at the man page under FreeBSD, I see:
So in many cases,
Given the description referenced above, this will be transformed into:
Which is not the same as what was probably intended:
Adding parentheses to make the group a bit more obvious, this is:
To spot the difference, notice that both The second version will only output the current file if This is a long winded way of saying that | |||||||||||
feedback
|
|
It's also useful when you do other things, but still want to see the matches. This is a common script call for me:
| |||
|
feedback
|