Command works for Unix, but not AIX...

kill -9 ps -ef|grep RunInsiteActivityPush |grep -v grep|grep java|awk '{print $2}'
This command works perfectly to kill unix processes, but when running the same command under an AIX platform, I get the following error:
kill: 0403-008 The number of parameters specified is not correct.
What needs to be added, or removed?

It’s been many a winter since I used AIX, but I think I remember their “ps” was weird. Specifically, I’m not sure the default “ps” has the process pid in column 2.

Try running “ps-ef | head” on the AIX station. If you see a problem, fix the script accordingly. If not, then maybe the “awk” is using some default separator other than “any whitespace”.

I really can’t be certain - you’ll just have to debug it. Shouldn’t be too difficult, assuming you have basic command line skills.

Hope this helps

Dan Abarbanel

Try typing man ps ON the AIX box in question and making sure the parameters you’re trying to use are valid on the OS you’re on.
I’d do it for you, but I don’t have an AIX box handy.
ps is one of those commands with inconsistent syntax, due largely to the fact that BSD and SYSV systems started out with different parameters, and since the BSD/SYSV distinction started blurring, ps has gotten somewhat inconsistent.