PROBLEM: if command line is too long, ps command extracts a part of it only (for instance till -cvalue_c), so grep command fails.
Consider that shell_name.ksh supports input parameters commutation, but I can't force shell users to launch script with -d parameter in first position.
FROM PGREP MAN:
SEE ALSO
kill(1), proc(1), ps(1), truss(1), kill(2), proc(4), attri-
butes(5), regex(5), signal(5)
NOTES
Both utilities match the ERE pattern argument against either
the pr_fname or pr_psargs fields of the /proc/nnnnn/psinfo
files. The lengths of these strings are limited according to
definitions in <sys/procfs.h>. Patterns which can match
strings longer than the current limits may fail to match the
intended set of processes.
So, maybe I have to use other commands. Have you got any ideas to select processes with long command-line?
In Solaris there is a second ps command in /usr/ucb - it has different options than the normal ps command
Normal:
$ ps -ef
UCB:
$ /usr/ucb/ps -auxw
Using the other command might help (if you have it on your OS).
And please don't post the same question twice - if you have more information, post a relpy to your question. I'm going to link your other question to this.
ps -ef | grep out | grep -v out --> typo, what I did for sure:
ps -ef | grep out | grep -v grep --> -v grep for avoiding grep will find its own process
I get no results. When I grep for the process number i detetced before I get the following: