Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to obtain a simple use-case: redirect filtered data into file, unfiltered to the terminal?
- X-seq: zsh-users 23866
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: How to obtain a simple use-case: redirect filtered data into file, unfiltered to the terminal?
- Date: Thu, 7 Feb 2019 16:22:42 -0800
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tO/vRLK5EuDtjug3GEpIH5+e6RAUUbTW7erKB21ITUE=; b=di0hc3tisBIPmqWXBCq0PpPk5oXotVTblL1g8tMyTgAKxniC0bJWUZrOCpj/kBzUtz cFh/HLhyHVuwTGDmfzuO3F8MU1rrUd/iO6p27v8ek/eNzRxaaXPI+TTTd80G+WuJOliR sAGbz14yg+iM+8HgatRywdtAjWSrkOGUsYqnZjWY6kr1wZM93lUZx9Zcds4TS+31M7vx Vn3Pzt+A34Ewj76WFq3AqnMritvGZ3Qv7XmpFwY8iBU/m79T1CVFg2aSh6KXb5rDafHp 8wyCT9QVJFZEMs7YrCzL+oruiP1n/SIwpk9aoUPa1IGNTWEYquSRcO/xDr1dLyIXXptz HBFA==
- In-reply-to: <CAKc7PVBSJcVYT1WJDBx+63eazZdCbcjuUSQxz9Y91paJ=nGyeg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBSJcVYT1WJDBx+63eazZdCbcjuUSQxz9Y91paJ=nGyeg@mail.gmail.com>
On Thu, Feb 7, 2019 at 5:12 AM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> So writing one sentence: a terminal application outputting logs
> filtered-and-redirected into a file, preserving the connection and
> output to the terminal
The minimal syntax of the "script" command is "script outputfile
command" ... so let's use zsh tools to create the outputfile, and
leave managing the tty stuff to "script":
script >(ansifilter >>! scrapy.slog) scrapy crawl 2nd_MyDom "$@"
"${optarray[@]}"
This will say something like
Script started, output file is /dev/fd/12
which you can get rid of by "script -q ...".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author