Ok I have been trying that and did some reading up on awk however I can not seem to find how to only capture the last part.
Currently I do...
Code:
ps -ef | grep nco_p_syslog | grep -v grep | awk '{print $NF}' | awk -F. '{print $1}' > $OMNIHOME/bin/syslogfile.dat
Which gives the results of....
Code:
/lcl/prd/data/dc000p/dump/bdump/alert_dc000p
I only want the dc000p part to record to the dat file.
For the life of me I can not seem to figure out the awk commands to do that.
Any help would be great also explaining how the awk would work how its being used above. I am very new to it and the stuff I am reading is a bit confusing so far.