![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Jumpstart Issues Solaris 10 | soupbone38 | SUN Solaris | 7 | 12-08-2008 05:41 AM |
| Script works on Solaris, not on Linux | Silverhood | Shell Programming and Scripting | 1 | 10-05-2007 10:52 AM |
| Script works on Solaris, not on Linux | Silverhood | Shell Programming and Scripting | 0 | 10-05-2007 10:27 AM |
| Samba 3.0.14 on Solaris 10 issues | Sapna | SUN Solaris | 0 | 10-10-2005 03:21 PM |
| Solaris boot issues | xyyz | UNIX for Advanced & Expert Users | 6 | 02-14-2003 02:36 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Nope it was not running, sorry :-)
Ok restarted it and then tried from command line again. Code:
bluemarron:/lcl/apps/Tivoli/netcool/omnibus/probes>ps -ef | grep nco_p_syslog | grep -v grep Code:
tivoli 13226 25357 0 15:49 pts/0 00:00:00 /lcl/apps/Tivoli/netcool/omnibus/probes/linux2x86/nco_p_syslog -manager dc000p.syslog -propsfile /lcl/apps/Tivoli/netcool/omnibus/probes/linux2x86/syslog.dc000p.props -logfile /lcl/prd/data/dc000p/dump/bdump/alert_dc000p.log |
|
||||
|
Its really strange to me...
I do this from command line... Code:
bluemarron:/lcl/apps/Tivoli/netcool/omnibus/bin>ps -ef | grep nco_p_syslog | grep -v grep | awk '{print $NF}' | awk -F. '{print $1}' | cut -d '_' -f 2
Code:
dc000p Yet when I do the same thing from a script.... Code:
#!/bin/ksh
# Create and populate array of db syslog probes which are currently running
ps -ef | grep nco_p_syslog | grep -v grep | awk '{print $NF}' | awk -F. '{print $1}' | cut -d '_' -f 2 > $OMNIHOME/bin/syslogfile.dat
set -A syslog_array
syslogfile_name='syslogfile.dat'
Code:
/lcl/prd/data/dc000p/dump/bdump/alert_dc000p |
|
||||
|
Just do:
ps -ef | grep nco_p_syslog | grep -v grep from the command line. Then put that *same command* in a script and run it from the same place you're running the other script from. #!/bin/sh ps -ef | grep nco_p_syslog | grep -v grep And compare the outputs. You're not going to find out what the difference is until you compare the raw output. It's entirely possible that the results returned will be different depending on a lot of factors, you'll just have to adjust your script to account for those differences. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|