1832169 Members
2947 Online
110038 Solutions
New Discussion

application

 
SOLVED
Go to solution
Anjaneyulu
Frequent Advisor

application

root 4564 4473 0 09:57:56 pts/2 0:00 grep export.sh

In the above I got that outpu when iam checing the exports. I think there was exports are not running please confirm immediately
5 REPLIES 5
Aneesh Mohan
Honored Contributor
Solution

Re: application

Hi Anjan,

Yes there is no export.sh ,the one which appearing is your last command only .

try this
#ps -aef |grep export.sh|grep -v grep

Regds,
Aneesh
Aneesh Mohan
Honored Contributor

Re: application

hehhee ..am Wizard now ...

Thanks,
Aneesh
Anjaneyulu
Frequent Advisor

Re: application

ok thanks aneesh
Bill Hassell
Honored Contributor

Re: application

This is a very common mistake in using grep and ps. grep doesn't know anything about program names -- it simply searches for the string you want. Instead, use ps to find the exact program you are looking for. In your example, use this command:

UNIX95=1 ps -f -C export.sh

Be sure to type the line exactly as shown. The UNIX95 variable must be temporarily set for ps to use the -C option. Don't put the UNIX95=1 on a separate line as it can change other commands. The -C option does not use grep but searches the process table internally.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: application

If you don't want to use Bill's suggestion, you can use this grep trick:
ps -aef | grep "[e]xport.sh"