switch bet parent & child shell

switch bet parent & child shell

Post by karthikey » Sun, 28 Jul 2002 04:05:17



sir,
  I want to switch between parent & child shell in redhat 6.2.
ie
 bash  i am running sh and i got the child shell

pstree shows
  bash -- > sh

now i want to switch between bash & sh . help me.
I don't want to exit any of the shells

 
 
 

switch bet parent & child shell

Post by mjt » Sun, 28 Jul 2002 04:25:28


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message


> sir,
>   I want to switch between parent & child shell in redhat 6.2.
> ie
>  bash  i am running sh and i got the child shell

> pstree shows
>   bash -- > sh

> now i want to switch between bash & sh . help me.
> I don't want to exit any of the shells

if you mean you're doing this:

sh-2.05$

then do this to get back:
sh-2.05$ exit
exit

if you want BOTH, then start another session/console
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Michael J. Tobler: motorcyclist, surfer,  #    Black holes result
 skydiver, and author: "Inside Linux",     #   when God divides the  
 "C++ HowTo", "C++ Unleashed"              #     universe by zero

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9QaHAtTveLPAHcDIRAi5fAKCDlUWGoy9t2tdboba2V1aLvvAiMwCffz8e
FetPTm6TYMrNYM4xnOrr7/Y=
=Fnub
-----END PGP SIGNATURE-----

 
 
 

switch bet parent & child shell

Post by John Mello » Sun, 28 Jul 2002 10:00:21



>   I want to switch between parent & child shell in redhat 6.2.
> ie
>  bash  i am running sh and i got the child shell

> pstree shows
>   bash -- > sh

> now i want to switch between bash & sh . help me.
> I don't want to exit any of the shells

Why can't you use the bg and fg commands and the ^Z escape to do this?
 
 
 

switch bet parent & child shell

Post by Eric Pric » Mon, 29 Jul 2002 06:59:39




> >   I want to switch between parent & child shell in redhat 6.2.
> > ie
> >  bash  i am running sh and i got the child shell

> > pstree shows
> >   bash -- > sh

> > now i want to switch between bash & sh . help me.
> > I don't want to exit any of the shells

> Why can't you use the bg and fg commands and the ^Z escape to do this?

Because those are not system commands, they are shell commands.  They
will be grabbed by the lowest-nested shell you have.  This also applies
to shell scripts.  Since it starts up a copy of the shell when you run
the script, if you press control characters, they will go to the
programs that the script is running, not the script itself.