Deutsch   English   Français   Italiano  
<vm07mh$13cnk$5@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Lem Novantotto <Lem@none.invalid>
Newsgroups: comp.unix.shell
Subject: Re: Problem with 'rm -i' in ksh
Date: Sun, 12 Jan 2025 11:05:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <vm07mh$13cnk$5@dont-email.me>
References: <vlsqmt$fem4$1@dont-email.me> <vltjc3$htgh$1@dont-email.me>
	<vlttua$la3m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 12 Jan 2025 12:05:53 +0100 (CET)
Injection-Info: dont-email.me; posting-host="092d2d6496192b42037dbb3a1e348163";
	logging-data="1159924"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+MiFvvXA6vS3wtcDGRl+CnSwzKIBbCvXg="
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:KEH4/m60GTeqnAmog5Eqdd2YmAs=
Bytes: 2331

Il Sat, 11 Jan 2025 15:07:05 +0100, Janis Papanagnou ha scritto:

> Yes, just these commands in a script work also in my environment. (That
> was what I meant when I wrote: "constructing a test sample from
> scratch";
> it didn't lead me anywhere, since it just wasn't reproducible in a
> primitive context like that.)
> 
> I think it must have to do with the shell environment that in some way
> affects how 'rm -i' behaves. But I have no idea how an external
> (shell-environment-)condition could look like that makes an executed
> program like 'rm' behave as if all '-i' confirmations are "magically"
> considered as being each answered by "no" (without me typing anything).

Oh, I'm sorry for my mistake.

Letting alone the redirection of standard input, or the "cron or whatever" 
hypothesis, that didn't seem to fit your situation, and since the command 
works well itself in a primitive context, it seem strange to me that the 
cause can be found in your ksh configuration, too...

So, I can't think of anything... which doesn't impress me much: it happens 
frequently. ;)

However: if you add in the script "< /dev/tty" as in

rm -i file < /dev/tty

does it make any change?

rm -i is called in a pipe? Exec? Subshell?

I know you know. I'm out of ideas.
-- 
Bye, Lem
		Talis erit dies qualem egeris