Mac OSX Bash Shell
I want to use find to identify anything (directories or files) which do not follow an input pattern.
This works fine:
find . -path /Users/Me/Library -prune -o \! \( -path '*.jpg' \)
However I want to have a general ability to do from a bash alias or function eg:
alias negate_find="find . -path /Users/Me/Library -prune -o \! \( -path ' "$1" ' \)"
To allow shell input of the search term (which may contain spaces). The current syntax does not work, returning unknown primary or operator
on invocation. Grateful for assistance in what I am doing wrong.