Re: Problem with 'rm -i' in ksh

Liste des GroupesRevenir à cu shell 
Sujet : Re: Problem with 'rm -i' in ksh
De : Lem (at) *nospam* none.invalid (Lem Novantotto)
Groupes : comp.unix.shell
Date : 12. Jan 2025, 12:05:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vm07mh$13cnk$5@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.160 (Toresk; )
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

Date Sujet#  Auteur
11 Jan 25 * Problem with 'rm -i' in ksh21Janis Papanagnou
11 Jan 25 +* Re: Problem with 'rm -i' in ksh15Lem Novantotto
11 Jan 25 i`* Re: Problem with 'rm -i' in ksh14Janis Papanagnou
12 Jan 25 i `* Re: Problem with 'rm -i' in ksh13Lem Novantotto
12 Jan 25 i  `* Re: Problem with 'rm -i' in ksh12Janis Papanagnou
12 Jan 25 i   `* Re: Problem with 'rm -i' in ksh11Kenny McCormack
12 Jan 25 i    `* Re: Problem with 'rm -i' in ksh10Janis Papanagnou
12 Jan 25 i     +* Re: Problem with 'rm -i' in ksh2Janis Papanagnou
12 Jan 25 i     i`- Re: Problem with 'rm -i' in ksh1Lem Novantotto
13 Jan 25 i     `* Iterating over a set in bash (Was: Problem with 'rm -i' in ksh)7Kenny McCormack
13 Jan 25 i      +- Re: Iterating over a set in bash (Was: Problem with 'rm -i' in ksh)1Janis Papanagnou
13 Jan 25 i      `* Re: Iterating over a set in bash (Was: Problem with 'rm -i' in ksh)5Lem Novantotto
13 Jan 25 i       +- Re: Iterating over a set in bash (Was: Problem with 'rm -i' in ksh)1Lem Novantotto
14 Jan 25 i       `* Re: Iterating over a set in bash3Keith Thompson
14 Jan 25 i        `* Re: Iterating over a set in bash2Lem Novantotto
14 Jan 25 i         `- Re: Iterating over a set in bash1Janis Papanagnou
11 Jan 25 `* Re: Problem with 'rm -i' in ksh5Christian Weisgerber
11 Jan 25  +* Re: Problem with 'rm -i' in ksh2Kenny McCormack
12 Jan 25  i`- Re: Problem with 'rm -i' in ksh1Janis Papanagnou
12 Jan 25  +- Re: Problem with 'rm -i' in ksh1Janis Papanagnou
12 Jan 25  `- Re: Problem with 'rm -i' in ksh1Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal