Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.unix.shell Subject: Re: Problem with 'rm -i' in ksh Date: Sun, 12 Jan 2025 17:08:03 +0100 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sun, 12 Jan 2025 17:08:04 +0100 (CET) Injection-Info: dont-email.me; posting-host="c826e18720b6da4495e24856fed325dd"; logging-data="1289064"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Uy1f60+AEZvnXzQOW3a4g" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:h4wSqGmOhrfW8EMNQy9OYCK8q2k= X-Enigmail-Draft-Status: N1110 In-Reply-To: Bytes: 2021 On 12.01.2025 16:39, Janis Papanagnou wrote: > On 12.01.2025 15:14, Kenny McCormack wrote: >> In article , >> Janis Papanagnou wrote: >> ... >>> It's called in a (ksh-)function within a structure like this >>> >>> function f { ... rm ... } >>> p1 | p2 | while read ... do ... f ... done >>> f >> >> When you are in a "... | while read" loop, the stuff inside the while loop >> has stdin coming from the pipe. BTW; there's two calls of 'f', one in the loop (without stdin), the other outside (supposedly having stdin). - I wonder why the latter also didn't work; it neither showed the flushed data nor interrogated the interactive confirmation for the final data. (Am I still missing something?) Janis