#!/usr/bin/perl -w use strict; my $ppid = getppid(); my $shell = `/usr/bin/ps -p $ppid`; $shell = (split(/\s+/, $shell))[$#_]; print qq(The parent pid is $ppid\n); print qq(The name of the parent shell is $shell\n);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What shell am I running?
by rob_au (Abbot) on Nov 17, 2001 at 09:40 UTC | |
|
Re: What shell am I running?
by blakem (Monsignor) on Nov 17, 2001 at 03:39 UTC | |
|
Re: What shell am I running?
by data64 (Chaplain) on Nov 17, 2001 at 06:20 UTC | |
by blakem (Monsignor) on Nov 17, 2001 at 06:31 UTC | |
by theorbtwo (Prior) on Nov 17, 2001 at 06:39 UTC | |
by blakem (Monsignor) on Nov 17, 2001 at 07:22 UTC | |
|
Re: What shell am I running?
by data64 (Chaplain) on Nov 17, 2001 at 06:43 UTC |