From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id b44e35d3 for ; Thu, 7 Feb 2019 13:12:32 +0000 (UTC) Received: (qmail 804 invoked by alias); 7 Feb 2019 13:12:19 -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: List-Unsubscribe: X-Seq: 23863 Received: (qmail 11206 invoked by uid 1010); 7 Feb 2019 13:12:19 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f44.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(209.85.210.44):SA:0(-2.0/5.0):. Processed in 0.806519 secs); 07 Feb 2019 13:12:19 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=3fHwVTr+99cMOFWhdIMXrGKalU58OE5KLFiP9mG+T94=; b=D2IIWtcTKZggj1mRjOk3lM83ZNt/iurdYFQ0b8valQKPA9NUk9VjexB/aWh8tESIoV o32OZBJl6Ax5C3GDm/uybBi/cb5alVC0jTJvXwYXChB9B5xVDN9rfC92tRuxrYmbZvHa 2Y/4mS1XY9G7A9ORugNDDlD2X0UjPaYxeU+fpFqFQfxkpbtLZ18RrXK4+sS7O6NOyHLG VNhe8uJ6Z2opODAh9upGH4IIVgaVP+iy0YEl7HgX+bHS2rT5ZEcSI5ACsL2idTh++pV+ nm40ABzfGcLFqDfhVnBhW4Zc5MQqao01ZXe2lAahzpx6lMyDW4Iu5fuOfFvgkxUaT2k/ ON6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=3fHwVTr+99cMOFWhdIMXrGKalU58OE5KLFiP9mG+T94=; b=rYOJBg/7GubSqskfKQuEwFMvwI2MinM3MIQgGaEImphk7nk5NSuDbmZItOQUWJyLaf zkbAnp9gaJEVN6hejn+HrECXYzwMCmSi0o5lbVEZTW3KJxS2IwTQJswn3NSgUt/JZ3jf j+k8GMzSMPrbf6Jb6cfkFdxMtzo4Bu1LAqt12RTO8UOnz8ynf+h/ei4u7RgBg4liTFC7 5HczHoHPXz+sd2qUyCBQE3hhfSLnhcLE7iZ9k1AuDdWEfl5bxZeicasxVk/cyHTjJjEp xoNfirQpweTgxmgp/6k9K5j5RGD10Y7Q4rfVWxtHMC6jDWZfecadY6IeBRlcMQtNXUoz lEow== X-Gm-Message-State: AHQUAuZqt5tsdj1uBzQ34r0NC60hnzH3HWCMO5yzr09SgZi2TyrkRX7O MHBKN8tBQz9kjHJPNEEudfIVvLmwZVFYaSA9558AQ3aW X-Google-Smtp-Source: AHgI3IYbX3vLuKDp2pAudDkdYjeleQ/6M9WIqOaibry547qKUcqBxbY2+kVYMiZ+1vlqa+qx/5WXoqCzCOrO8JKnD98= X-Received: by 2002:aca:af53:: with SMTP id y80mr255055oie.170.1549545136060; Thu, 07 Feb 2019 05:12:16 -0800 (PST) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Thu, 7 Feb 2019 14:12:04 +0100 Message-ID: Subject: How to obtain a simple use-case: redirect filtered data into file, unfiltered to the terminal? To: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I have a simple use-case that I would want to implement: 1. There is an application that outputs colorized logs. 2. I want the logs to go into a file (say `operation.log') filtered, i.e. without colors. 3. But at the same time still go to the terminal unfiltered. 4. I want the application to have a positive response from the iatty(1) function, i.e. that the application is thinking that the output is to the terminal (well, it really *is*, it's just that it. *also* goes to the file). So writing one sentence: a terminal application outputting logs filtered-and-redirected into a file, preserving the connection and output to the terminal, i.e. isatty(1) answers positively for the app. I tried with multios: scrapy crawl 2nd_MyDom "$@" "${optarray[@]}" \ > >(ansifilter >>! "scrapy.slog") 1> >/dev/tty But this solution doesn't realize the 4th item =E2=80=93 it doesn't provide isatty(1) positive response for the app. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org