bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

script vs. terminal vs. same line vs. ^C


From: jidanni
Subject: script vs. terminal vs. same line vs. ^C
Date: Wed, 10 Sep 2008 06:45:32 +0800

Here we see with the same $-, if you put it on the same line, you'll
run it despite ^C...

$ cat file
echo $-; sleep 7; echo BOOM
$ bash -i file
bhimBC
^C
$ echo $-; sleep 7; echo BOOM
bhimBC
^C
BOOM

OK, same $-, and same test -t <whatever>, so what does one have to do
to make bash think it is a script and not go BOOM, unset PS1 or something?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]