below is what I had in the code, maybe I missed something b/c it doesn't seem to work.
#!/bin/ksh
HOME="/home/"
DATE=$(date)
HOSTNAME=$(hostname)
ps -ef |grep pmon > pmon.txt
db_alive=$HOME/pmon.txt
echo "$db_alive" | awk -F"_" '{print $NF}'
executed the above script and the result:
$ ./test2*
/home/pmon.txt
thx
Last edited by Madison00; 10-18-2010 at 09:49 AM.
|