Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to redirect output without escape sequences to a file
- X-seq: zsh-users 16007
- From: Aaron Davies <aaron.davies@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: How to redirect output without escape sequences to a file
- Date: Sun, 8 May 2011 21:58:13 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=xntGuvSVx0BQ1DSgrsbd4wvPXZRduDNd+4yEQGKam9s=; b=uLwF/xW8wMu5PkebF/7YLCf9kdHXSNMYqqJhEn3/ROsIet//Km3hBHejUrPO7TB0nb Q6AyU4L4zLSmqZ0ujEOnNWkhrKgbztSbU6T43TTYbGqRT54fwBtZ2PRcskTTulRfwxsH IvD3wE+oLSu1BqtmYCMR2XrdJQDCC14QbUJpw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=B60OKVThu/sCHvxKD+AaeC2SNkEO+2oKpBwqSmkiSHCI8xS0mz5NeNLVFzjUTD84WG XBgz6f9phgZLAEDf6xLSiRGAni3mLXKYB7PxecL8+qjpPNKFX2qA7NjSs5i1ISTOAjvJ urGyAA8QbIhS7rMWA46rnT9PElTya9TOG5WqQ=
- In-reply-to: <iq6qrc$39j$1@dough.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <iq6qrc$39j$1@dough.gmane.org>
On May 8, 2011, at 3:27 PM, Thorsten Kampe wrote:
> 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?
not sure about those, but "less -R" (or "less -r") may help--they make less output ANSI color sequences (or all control sequences) literally, instead of with caret notation, so you'd actually see the same colors you do on the console.
--
Aaron Davies
aaron.davies@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author