From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59630 invoked by alias); 3 Oct 2018 16:50:23 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 59611 invoked by uid 89); 3 Oct 2018 16:50:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=BAYES_50,FOREIGN_BODY,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Avast, auf, diese, EMail X-HELO: mail-wm1-f52.google.com Received: from mail-wm1-f52.google.com (HELO mail-wm1-f52.google.com) (209.85.128.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Oct 2018 16:50:21 +0000 Received: by mail-wm1-f52.google.com with SMTP id o18-v6so6355560wmc.0 for ; Wed, 03 Oct 2018 09:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=2YtobbrXfW94EAY59wdxe6ta4CSTX90v+3fA77dcmDs=; b=YNL0kVn3sjmeV1F/iizklrLG6VFpK07rTTlxIa2oDlzl65d97x57ELgWZ8nYIxV6E1 mWQar6AzpkYg0FW0+WJgL52Mdb3aRXGFcQT9DudEnrnWXsrD4yNDeZcdQCyBFs+btxUm FkEg9+cl9jw0xJ5IvgRuXagF54eXOjbzAXJiBY2JP9DGlbF/Ewm0qNn/ahfkE1zkn8kW /n4JnoaGRGT+LEhV0E7+XfEB9IbFLVTPzlQMq0B4lf3VDKURL1eSDXmc7lh+s/DqEAj2 SppvMaSlAS2ZmYXybDu3w8lxeb7zxj855dHn/c0Mc91yJbUOs/tviaLhnjvUVM7n//1z TLtw== Return-Path: Received: from ?IPv6:::1? (p200300EE63D12701199C9EAC2F1D3980.dip0.t-ipconnect.de. [2003:ee:63d1:2701:199c:9eac:2f1d:3980]) by smtp.gmail.com with ESMTPSA id y184-v6sm2233253wmg.17.2018.10.03.09.50.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 09:50:18 -0700 (PDT) Subject: Re: grep < fifo fails To: cygwin@cygwin.com References: From: Marco Atzeri Message-ID: Date: Wed, 03 Oct 2018 16:50:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00024.txt.bz2 Am 03.10.2018 um 17:37 schrieb Ole Tange: > This works: > > $ mkfifo fifo > $ echo > fifo & grep . fifo > [1] 10232 > [1]+ Done echo > fifo > > But this fails: > > $ echo > fifo & grep . < fifo > [1] 11756 > grep: (standard input): Invalid argument > [1]+ Done echo > fifo > > I see the same behavior on MINGW, but I do not see the same behavior on G= NU/Linux. > > > Regards, > > Ole Tange I assume it is a consequence of the same problem on files. You can not use the same source for input and output. $ echo "prova" > prova.txt $ cat prova.txt prova $ cat prova.txt > prova.txt $ cat prova.txt the file was erased --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr=C3=BCft. https://www.avast.com/antivirus -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple