using grep with pipe and ampersand to filter errors from find
- by HKK
I am using cygwin to find a file on the cygdrive.
However I need to suppress the permission denied messages (otherwise the results get hidden in the error messages). The following command works:
find -name 'myfile.*' |& grep -v "Permission denied"
I don't understand why the ampersand needs to be put into this command, would have expected this to work but it doesn't.
find -name 'myfile.*' | grep -v "Permission denied"
Please explain the meaning of the ampersand.