I have a simple workflow, that checks if a file exists, and shows a notification with the content if it does, and a Large type ERROR, if it doesn't. I think I misunderstand something with how filter works.
The script looks like this:
FILE="/Users/niclas/test.txt"
if [ -f "$FILE" ];
then
cat $FILE
else
echo "";
fi
Top filter: Only continue if {query} is not equal to (empty)
Bottom filter: Only continue if {query} is equal to (empty)
The notification looks like:
Read OK {query}
The problem is, it always shows the first one, even if the file doesn't exist.
I also tried make it output 0, and "Only continue if {query} is equal to 0", but with the same results.
I also tried a regex (0)+, it didn't work either.
What am I doing wrong? I've attached the workflow here: Workflow
Thanks!