[Ilugc] changing shell and finding it

R.Ramkumar andyetitmoves at gmail.com
Thu Jun 22 22:15:23 IST 2006


> echo $$

thats only the pid of the shell. as the faq mentioned by you says, u
have to grep thru ps for this pid.

that reminds me of the short cut for linux systems.

`cat /proc/$$/exe`... gives u the path to the executable.
read the file /proc/$$/cmdline till the first \0 for argv[0] of the shell..

it moves on...

-- 
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"


More information about the ilugc mailing list