X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=TZ2Hrrk+r+1LAA7L 030ml50+x8UFomTx4ufAG1hvUduxjcAf3UxRPJmj9AmGE4gDYaI4bBL0ifi4vxLY aDAyHE/KuMkecO12VQxjiemgIBmObbCf54JzvF/7L5y06S8Zys5I0bQMWy30xpAE GaAttxf7lc7YbFklVMkY3ZGqyxc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=veA1i49pIU/JO2E2Xi0fgu l56Yo=; b=GzKv7pFE/9l64/T5TaRIviyIIy6ZzEQetkQ1mNfvWHoIF5XWmHP+tE N4umHphS+iZ5w8hzy7KuetM1yT40rP77Y96BkClsqhbwAvQ5yIsFBSvwk2iPIlAy ZTqCBkrDESXK5e+ovOUIyPZ63Rjxt3AOh0L1wGGo3m+qu5bYYY2ZY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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== Subject: Re: grep < fifo fails To: cygwin AT cygwin DOT com References: From: Marco Atzeri Message-ID: Date: Wed, 3 Oct 2018 18:50:18 +0200 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 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w93GoWQf013072 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 GNU/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üft. 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