"Com MN PG P E B Consultant 3" wrote:
>rlogin foobar
>DO SOME STUFF
>cleartool setview myview # this creates a subshell
>DO MORE STUFF
>cleartool setview yourview # now I'm two subshells deep
>DO STILL MORE STUFF
># Now I want to exit
>exit
>exit
>logout
You
On 10/12/06, Com MN PG P E B Consultant 3
<[EMAIL PROTECTED]> wrote:
Does someone know how to deal with the following situation?
Very often I do the following pattern:
(1) rlogin to a foreign host
(2) Invoke a subshell (for example because I'm setting a Clearcase
View)
(3) Logout from
> What about in your login (.bash_profile, etc) exporting a
> variable, say
> ROOT_PID=$$ and having a command/function/alias 'kill -s SIGHUP
> $ROOT_PID'? This is equivalent to killing the rlogin connection, but
> should clean up nicely if all you have are shells.
Excellent idea! Thank you fo
Very often I do the following pattern:
(1) rlogin to a foreign host
(2) Invoke a subshell (for example because I'm setting a Clearcase
View)
(3) Logout from the host
Step (3) needs two steps: First I have to type 'exit' to leave the
subshell,
and then either 'exit' or 'logout' to leave
Com MN PG P E B Consultant 3 wrote:
Does someone know how to deal with the following situation?
Very often I do the following pattern:
(1) rlogin to a foreign host
(2) Invoke a subshell (for example because I'm setting a Clearcase
View)
(3) Logout from the host
Step (3) needs two step
> >(1) rlogin to a foreign host
> >(2) Invoke a subshell (for example because I'm setting a
> Clearcase
> > View)
> >(3) Logout from the host
> >
> > Step (3) needs two steps: First I have to type 'exit' to leave the
> > subshell, and then either 'exit' or 'logout' to leave the
> log
> > I can't use traps here, because I know only at "exit time", whether
> > I want to logout completely, or just go up one level.
>
> $ call_and_exit() { "$@"; if test $? -eq 42; then exit; fi; }
> $ call_and_exit cleartool ...
> $ exit 42
This looks clever. Maybe one should use "exit 42" too in
"Com MN PG P E B Consultant 3" <[EMAIL PROTECTED]>
writes:
> I can't use traps here, because I know only at "exit time", whether
> I want to logout completely, or just go up one level.
$ call_and_exit() { "$@"; if test $? -eq 42; then exit; fi; }
$ call_and_exit cleartool ...
$ exit 42
Andreas.
> >(1) rlogin to a foreign host
> >(2) Invoke a subshell (for example because I'm setting a
> Clearcase
> > View)
>
> Is it a subshell or a second-level shell? (In the first case, $$ and
> $PPID remain the same.)
Could you kindly explain the difference? I thought it's always the
same - a
> >rlogin foobar
> >DO SOME STUFF
> >cleartool setview myview # this creates a subshell
> >DO MORE STUFF
> >cleartool setview yourview # now I'm two subshells deep
> >DO STILL MORE STUFF
> ># Now I want to exit
> >exit
> >exit
> >logout
> >
> > I would like t
On 2006-10-12 10:47:38 +0200, Com MN PG P E B Consultant 3 wrote:
> Does someone know how to deal with the following situation?
>
> Very often I do the following pattern:
>
>(1) rlogin to a foreign host
>(2) Invoke a subshell (for example because I'm setting a Clearcase
> View)
Is it a s
"Com MN PG P E B Consultant 3" <[EMAIL PROTECTED]>
writes:
> A typical application would go like this:
>
>rlogin foobar
>DO SOME STUFF
>cleartool setview myview # this creates a subshell
>DO MORE STUFF
>cleartool setview yourview # now I'm two subshells deep
>DO STILL MORE
> How about
> function rlogin() {command rlogin "$@"; exit}
> ?
H I don't see how this could help me. Actually, your
solution would EXIT the shell I came from, after the login
has finished!! So I not only have to type all the "exit"s on
the remote host, I would even loose my current shell
On Thu, Oct 12, 2006 at 10:47:38AM +0200, Com MN PG P E B Consultant 3 wrote:
>(1) rlogin to a foreign host
>(2) Invoke a subshell (for example because I'm setting a Clearcase
> View)
>(3) Logout from the host
>
> Step (3) needs two steps: First I have to type 'exit' to leave the
> sub
14 matches
Mail list logo