Carlos Chavez
2022-Aug-03 15:20 UTC
[asterisk-users] Run asterisk -rx "command" and get plain text output
I usually like to have the colorized output when looking at asterisk output but I need to get some info by running "asterisk -rx" and get just plain text output so I can mail it. Right now I get ANSI codes in the output. Is there a way to get plain text output for just that script and not disable colors for everything? -- Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez +52 (55)8116-9161
Joel Serrano
2022-Aug-03 15:35 UTC
[asterisk-users] Run asterisk -rx "command" and get plain text output
Have you tried adding “-n”? Also, what version of asterisk are you using? newer versions only have colorized output when your are connected to the console (-r) not for remote commands (-rx) On Wed, Aug 3, 2022 at 08:21 Carlos Chavez <cursor at telecomab.mx> wrote:> I usually like to have the colorized output when looking at > asterisk output but I need to get some info by running "asterisk -rx" > and get just plain text output so I can mail it. Right now I get ANSI > codes in the output. Is there a way to get plain text output for just > that script and not disable colors for everything? > > -- > Telecomunicaciones Abiertas de México S.A. de C.V. > Carlos Chávez > +52 (55)8116-9161 > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220803/6a87992a/attachment.html>
Steve Edwards
2022-Aug-04 02:23 UTC
[asterisk-users] Run asterisk -rx "command" and get plain text output
On Wed, 3 Aug 2022, Carlos Chavez wrote:> ...running "asterisk -rx"...The '-r' is implied: -x command Connect to a running Asterisk process and execute a command on a command line, passing any output through to standard out and then terminating when the com‐ mand execution completes. Implies -r when -R is not explicitly supplied. Also, as already suggested, please try adding: [options] nocolor = yes in your asterisk.conf file. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281