From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12105 invoked by alias); 8 May 2011 19:28:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16002 Received: (qmail 3134 invoked from network); 8 May 2011 19:27:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Thorsten Kampe Subject: How to redirect output without escape sequences to a file Date: Sun, 8 May 2011 21:27:30 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: nat.scz.novell.com User-Agent: MicroPlanet-Gravity/3.0.4 Hi, I've modified my PS4 so it contains a little bit of colour[1]. When I redirect the debug output to a file ("&> trace.log") this naturally contains the escape sequences literally[2] (which makes the output somehow unclear). Is there a way to either strip the escape sequences when redirected to a file or to modify PS4 when stderr is redirected to a file? Thanks in advance, Thorsten [1] PS4='%{\e[1;36m%}+%{\e[m%}%1N[%i]%{\e[1;36m%}:%{\e[m%} ' [2] +slpsnoop.sh[53]: print