chuck
chuck copied to clipboard
chuck --probe output is not greppable
When doing automation setups with ChucK you may need to grep its output of --probe
command, or parse that in some other way.
Currently I don't see an easy way to do that — apparently all the output is sent to STDERR as a single line while all newline symbols are sent to STDOUT.
If you are using the BASH shell you can try sending STDERR to an anonymous pipe. Below is an example on MacOS:
$ chuck --probe 2> >(grep -B1 Microphone)
[chuck]: ------( audio device: 2 )---------------
[chuck]: device name = "Apple Inc.: Built-in Microphone"
osx_version = 4245
Right, probably some part of initial defect was fixed in a recent version -- in ChucK version which I checked all the output went to STDERR as a single string (with no linebreaks). Thus you can't grep.
I checked on MacOS and I confirm that you can grep STDERR now. Still putting all the output to STDERR doesn't look right to me.