|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I ran 'set -n' at the prompt and now it refuses to execute my commands!
Solaris 5.8. Er, how do I get out? I put a couple of jobs in the background and would prefer to bring ths terminal back to life rather than simply kill it. Thanks, Sashi |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>,
Sashi wrote: > I ran 'set -n' at the prompt and now it refuses to execute my commands! > > Solaris 5.8. > > Er, how do I get out? I put a couple of jobs in the background and > would prefer to bring ths terminal back to life rather than simply kill > it. send an eof. or several. what shell are you using? set -n is ignored on bash and (this may vary) ksh, and rejected on zsh. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
2006-11-2, 21:32(+00), Jordan Abel:
> 2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>, > Sashi wrote: >> I ran 'set -n' at the prompt and now it refuses to execute my commands! >> >> Solaris 5.8. >> >> Er, how do I get out? I put a couple of jobs in the background and >> would prefer to bring ths terminal back to life rather than simply kill >> it. > > send an eof. or several. That will terminate the shell though. There may not be any better solution to that problem, though. > what shell are you using? set -n is ignored on bash and (this may vary) ksh, and > rejected on zsh. I beleive he is using the Bourne shell. SUSv3 says that an interactive shell may ignore a "set -n" so a POSIX shell may also behave like that though as you point out, except for ash based shells, there doesn't seem to be any that does (someone must have run into the problem and decided to fix it). -- Stéphane |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Stephane CHAZELAS wrote: > 2006-11-2, 21:32(+00), Jordan Abel: > > 2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>, > > Sashi wrote: > >> I ran 'set -n' at the prompt and now it refuses to execute my commands! > >> > >> Solaris 5.8. > >> > >> Er, how do I get out? I put a couple of jobs in the background and > >> would prefer to bring ths terminal back to life rather than simply kill > >> it. > > > > send an eof. or several. > > That will terminate the shell though. There may not be any > better solution to that problem, though. > > > what shell are you using? set -n is ignored on bash and (this may vary)ksh, and > > rejected on zsh. > > I beleive he is using the Bourne shell. > > SUSv3 says that an interactive shell may ignore a "set -n" so a > POSIX shell may also behave like that though as you point out, > except for ash based shells, there doesn't seem to be any that > does (someone must have run into the problem and decided to fix > it). > > -- > Stéphane Sorry, here you go. $bash -version GNU bash, version 2.03.0(1)-release (sparc-sun-solaris) Copyright 1998 Free Software Foundation, Inc. The man page for set specifically says that the -n option is ignored for interactive shells (and it's easy to see why). Thanks, Sashi |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
2006-11-02 <1162504522.926549.113360@k70g2000cwa.googlegroups .com>,
Sashi wrote: > > Stephane CHAZELAS wrote: >> 2006-11-2, 21:32(+00), Jordan Abel: >> > 2006-11-02 <1162501821.623003.23190@m7g2000cwm.googlegroups.c om>, >> > Sashi wrote: >> >> I ran 'set -n' at the prompt and now it refuses to execute my commands! >> >> >> >> Solaris 5.8. >> >> >> >> Er, how do I get out? I put a couple of jobs in the background and >> >> would prefer to bring ths terminal back to life rather than simply kill >> >> it. >> > >> > send an eof. or several. >> >> That will terminate the shell though. There may not be any >> better solution to that problem, though. >> >> > what shell are you using? set -n is ignored on bash and (this may vary) ksh, and >> > rejected on zsh. >> >> I beleive he is using the Bourne shell. >> >> SUSv3 says that an interactive shell may ignore a "set -n" so a >> POSIX shell may also behave like that though as you point out, >> except for ash based shells, there doesn't seem to be any that >> does (someone must have run into the problem and decided to fix >> it). >> >> -- >> Stéphane > > > Sorry, here you go. > > $bash -version > GNU bash, version 2.03.0(1)-release (sparc-sun-solaris) > Copyright 1998 Free Software Foundation, Inc. > > The man page for set specifically says that the -n option is ignored > for interactive shells (and it's easy to see why). So evidently that's not what you're using, or it would have been ignored and you'd never have posted this thread. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Sashi wrote: > I ran 'set -n' at the prompt and now it refuses to execute my commands! > > Solaris 5.8. > > Er, how do I get out? I put a couple of jobs in the background and > would prefer to bring ths terminal back to life rather than simply kill > it. > > Thanks, > Sashi dbx -qc 'assign read_but_dont_execute=0;quit' - pid-of-bash |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
In article <1162578245.095731.88870@h54g2000cwb.googlegroups. com>,
W.G. <leopardie333@yahoo.com> wrote: > >Sashi wrote: >> I ran 'set -n' at the prompt and now it refuses to execute my commands! >> >> Solaris 5.8. >> >> Er, how do I get out? I put a couple of jobs in the background and >> would prefer to bring ths terminal back to life rather than simply kill >> it. >> >> Thanks, >> Sashi > >dbx -qc 'assign read_but_dont_execute=0;quit' - pid-of-bash Interesting. Which platform(s) have "dbx"? (Couldn't find it on either Linux or Solaris) |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
2006-11-3, 20:38(+00), Kenny McCormack:
[...] >>dbx -qc 'assign read_but_dont_execute=0;quit' - pid-of-bash > > Interesting. > > Which platform(s) have "dbx"? (Couldn't find it on either Linux or Solaris) And, as said, bash will ignore "set -n" when interactive. If it is the Bourne shell (/bin/sh) on Solaris, then the equivalent, that seems to work would be: printf 'attach <pid>\nset flags = flags & ~1\ndetach\n' | gdb /bin/sh Where <pid> is to be replaced with the pid of sh. -- Stéphane |
|
![]() |
| Outils de la discussion | |
|
|