redcell184 has asked for the wisdom of the Perl Monks concerning the following question:
And this is the output i receive from it:#!/usr/bin/perl -w $PID=`cat /export/home/weblogic/bai/bpps.sh.pid`; print "Checking\n"; check_for_bpps(); sub check_for_bpps { $PS=`ps -eaf | grep $PID`; if ($PS =~ /bpps/) { print "output from ps is: $PS\n"; } else { print "Stopping process and restarting process\n"; exec(`sh -c /export/home/weblogic/bai/bpps.sh stop;sh -c /expo +rt/home/weblogic/bai/bpps.sh start 2 > /dev/null 2>&1`); } }
Thanks in advance.Checking Stopping process and restarting process /export/home/weblogic/bai/bpps.sh: //.profile: No such file or directo +ry sh: usage:: not found
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trying to pass variable output to subroutine
by shmem (Chancellor) on Nov 08, 2007 at 14:51 UTC | |
|
Re: Trying to pass variable output to subroutine
by cdarke (Prior) on Nov 08, 2007 at 16:40 UTC | |
|
Re: Trying to pass variable output to subroutine
by redcell184 (Initiate) on Nov 12, 2007 at 21:52 UTC |