cc: [email protected]
Subject: Re: [ast-users] [ksh93] Any way to get the full file name of current  
running ksh?
--------
> 
> Bash has a $BASH var for this purpose so I can define following alias to
> reload the rc files without exiting and restarting the shell:
> 
>   alias rr='echo "+++ Restarting $BASH ..."; exec $BASH'
> 
> (attachment  1     7/299                text/html "1.att")
> 

It will exit and restart bash, using the same process id.

I am not sure that it is possible to get the pathname for the
current process on all systems.

However for linux, and some other systems
        /proc/$$/exe
is a symlink to the pathname of the current process so
        ME=$(ls -l /proc/$$/exe)
        ME=${ME#*-\> }
will give the pathname for ksh (the current process and
        alias rr='echo "+++ Restarting $ME ..."; exec $ME'
will do the same as your rr alias.

David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to