I see the following error message in asterisk when executing CLI commands from Linux bash while filtering the output with ‘grep -g’ (output suppress)
The following command is executed without problems when there’s no output suppression (option -g):
/usr/sbin/asterisk -rx 'sip show peers' | grep 'SIPTRUNK'
And this one triggers the error:
/usr/sbin/asterisk -rx 'sip show peers' | grep -q 'SIPTRUNK'
This is the following snippet from the log:
[2017-03-13 13:18:46] ERROR: utils.c:1332 ast_carefulwrite: write() returned error: Broken pipe
Is it possible that this standard output filtering is messing with asterisk?
Any help is appreciated.
Certified asterisk 11.6-cert13