Hi,
I have the following shell script in Keyboard Maestro:
read -r -d '' shCMD <<EOT
mdfind -onlyin "$KMVAR_rcPath" "kMDItemUserTags == '*$KMVAR_Tag*'" | sort -d
EOT
eval "$shCMD";
I know hardly anything about using shell scripts, this is something I found from somewhere.
It references a folder to search in (rcPath) and the tag to look for (Tag).
With most tags it works fine, returning a list of files. However, certain tags it has trouble with, which seem to be tags with quotes and other unusual characters in them.
Does anyone know how to modify this script so that it would work for ALL tags, including those that have funny characters?
Many thanks!
Andy