public inbox for gentoo-user-de@lists.gentoo.org
 help / color / mirror / Atom feed
From: Robert Welz <welz@fixe-post.de>
To: gentoo-user-de@lists.gentoo.org
Subject: [gentoo-user-de] ANSI Sequenzen in bash
Date: Sun, 10 Jun 2007 13:17:58 +0200	[thread overview]
Message-ID: <0823DC1D-ACED-4039-9DDB-4BE9E98F3907@fixe-post.de> (raw)

Hallo!

Ich habe ein kleines Script, was u.a. einen Dienst neustartet.

Die Rückmeldung dieses Neustarts hätte ich gerne als email:

restart_result=`/etc/init.d/boinc restart`
/usr/bin/echo -e "$restart_result" | /root/bin/mail "script runs"  
cron-Oberon

Das Problem ist nur, dass restart_result voller color Codes ist:

  ^[[32;01m*^[[0m Stopping BOINC ...
^[[A^[[143C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
  ^[[32;01m*^[[0m Starting BOINC ...
^[[A^[[143C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
Sun, 06/10/07 12:56:34 Uhr

Wie werde ich die Steuercodes los? Ich habe
export TERM=xterm; export LS_COLORS="";
versucht aber das funktioniert nicht.

Komme ich um manuelles Ausfiltern mittels regex u.ä irgendwie herum?  
Gibt es ein Befehl, der das für mich macht, a la 'col -bx' ?

Danke!
Robert





--
gentoo-user-de@gentoo.org mailing list



             reply	other threads:[~2007-06-10 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10 11:17 Robert Welz [this message]
2007-06-10 11:33 ` [gentoo-user-de] ANSI Sequenzen in bash Tobias Hommel
2007-06-10 11:52   ` Robert Welz
2007-06-10 12:06 ` Bertram Scharpf
2007-06-10 12:06   ` Bertram Scharpf
2007-06-10 12:30   ` Robert Welz
2007-06-11  8:42 ` [gentoo-user-de] " Alexander Skwar
2007-06-19 11:42   ` Robert Welz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0823DC1D-ACED-4039-9DDB-4BE9E98F3907@fixe-post.de \
    --to=welz@fixe-post.de \
    --cc=gentoo-user-de@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox