> I want to run a command inside a script. From the shell,
> here's the command:
>
> % ps -ef | /bin/egrep '/usr/lib/sendmail' | /bin/grep -v grep
> | /bin/awk '{print $2}'
> 19460
Instead of the useless 'grep -v grep', do this:
% ps -ef | egrep '[/]usr/lib/sendmail' | awk '{print $2}'
> But, when I put this into a test script,
Might I suggest finding the 'pid' file for sendmail and reading that
instead? It should be under /var/run or some such directory...
Luke
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>