#!/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);
In reply to What shell am I running? by Rich36
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |