The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 04-22-2009
LRoberts LRoberts is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 87
Solaris / Linux Issues with script

Hello,

I run this command from a solaris box and it works just fine. It gives me the kind of output in my file I am looking for which would be for example...

sb1p
rdop
ot2p
ot3p
eimp


However when I do the same thing from a Linux box...

ps -ef | grep nco_p_syslog | grep -v grep | awk '{print $NF}' | awk -F. '{print $1}' > $OMNIHOME/bin/syslogfile.dat


I get this in the file...
/lcl/apps/Tivoli/netcool/omnibus/probes/linux2x86/syslog


Both are using
#!/bin/ksh


I have no idea where it is even getting that long directory path from for the results.

Any ideas?

Thanks in advance.