Can output
handle shell functionality like operators or redirects?
#3085
Closed
sadamczyk-eos
started this conversation in
General
Replies: 1 comment 1 reply
-
You would need to do something like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to handle changes between light/dark mode smoothly, and therefore need to detect which "mode" the device is currently in. I've already got it working on GNOME, but the MacOS command returns an exit code of 1 and dumps output onto stderr as well, if light mode is currently active, and returns a string for dark mode only.
That's why I'm trying to do something like this to avoid the error:
But this doesn't work because the
||
are probably just interpreted as additional arguments passed todefaults
, instead of the shell operator.Is there any way to do this, or am I forced to make a shell script for this? I'd like to avoid creating an additional shell script for something so small, and also it means I need to ensure that the shell script exists on the machine before the templates are processed, which also always feels like a bit of a hassle.
Beta Was this translation helpful? Give feedback.
All reactions