The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 04-22-2009
pludi's Avatar
pludi pludi is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,950
Why not
Code:
ps -ef | awk -F. '/nco_p_syslog/ { print $NF }' > $OMNIHOME/bin/syslogfile.dat # Solaris
ps -ef | awk -F'_' '/nco_p_syslog/ { print substr($NF, 1, index($NF, ".")-1) }'  > $OMNIHOME/bin/syslogfile.dat # Linux