Deutsch   English   Français   Italiano  
<vm2l77$1ni2s$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Re: Iterating over a set in bash (Was: Problem with 'rm -i' in ksh)
Date: Mon, 13 Jan 2025 10:08:54 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <vm2l77$1ni2s$1@dont-email.me>
References: <vlsqmt$fem4$1@dont-email.me> <vm0ela$15i9h$1@dont-email.me>
 <vm0inq$2st9j$1@news.xmission.com> <vm0no6$17127$1@dont-email.me>
 <vm1v8a$2tk9v$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Jan 2025 10:08:56 +0100 (CET)
Injection-Info: dont-email.me; posting-host="5b3599e30b8a81050b6cf7719714923d";
	logging-data="1820764"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/GP9cr+G9LY67OIJXn6i/C"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:j+aWr+KHSxqXoHYAUtzx6YL/nxA=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <vm1v8a$2tk9v$1@news.xmission.com>
Bytes: 2269

On 13.01.2025 03:54, Kenny McCormack wrote:
> 
> In general, when I need to iterate over a set (in bash), I use "mapfile".
> [...]
> I think more or less the same is available in ksh.

Not that I'd know of. - Maybe getting something similar using some
standard mechanisms? - If I understand 'mapfile' correctly it may
(basically) do something like   IFS=$'\n' arr=( $( ... ) )    ?

> 
> Oh, and another thing of interest to the original thread.  We were talking
> about whether the real underlying problem in the "rm" command could or
> should be fixed.  I did some reading and some testing.  "man rm" (on Linux)
> does mention stdin being a terminal - implying, somewhat obliquely, that
> the -i option checks that and behaves differently if stdin is not a
> terminal.

In case stdin is not a terminal I'd not expect the flushing of the
prompts; in case that condition is even checked I'd rather expect
a warning message. (But I haven't thought about that to any depth.)

Janis

> [...]