[Ilugc] changing shell and finding it

benjamin benjaminrtz at gmail.com
Fri Jun 23 00:24:11 IST 2006


On 6/22/06, R. Ramkumar <andyetitmoves at gmail.com> wrote:
>
> > "$$" is pid of the parent process, if you say "echo $$" from the shell
> > prompt after logging in, it is the process id of the parent shell.
>
> from the POSIX (IEEE 1003.1) specification:
>
> http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_05_02
>
> 2.5.2 Special Parameters
>
> ....
>
> $
>     Expands to the decimal process ID of the invoked shell. In a
> subshell (see Shell Execution Environment ), '$' shall expand to the
> same value as that of the current shell.


its says

"'$' shall expand to the same value as that of the current shell."

When you run a script, the current shell if no longer your login shell.

--
> April 1: This is the day upon which we are reminded of
> what we are on the other three hundred and sixty-four.
>           -- Mark Twain, "Pudd'nhead Wilson's Calendar"
>



-- 
benjamin rualthanzauva


More information about the ilugc mailing list