I'm trying to run a shell script to run a shortcut and then return the output of that into a variable by running the command:
/usr/bin/Shortcuts run "Get Current Focus" | cat
Now when I run that in terminal I get:
Personal%
or
Work%
Or whatever the current focus mode is set to.
But when I run it within Indigo I'm getting:
Run Shell Script action: script /usr/bin/Shortcuts exited abnormally with a return code of: 64
Now I presume it's something to do with the % that is being added onto the output (Which doesn't appear when run within Shortcuts itself) so I presume I need to parse this out, but I'm drawing a blank on how to do this (or indeed am I barking up the wrong tree?).
Any ideas?