> export CUPSPID=`ps -ef | grep cups | grep -v grep | awk '{print $2;}'`


This would assign the process ID (PID) of the cups deamon to an environment 
variable (CUPSPID). But only if the cups daemon is running. The variable could 
be used to troubleshoot printer issues, or to determine if  the cups daemon is 
running before trying to print.

This could be shortened by just using awk. 

ps -ef | awk '/cups/&&!/awk/{print $2}'

I think.

We're getting WAAAAY off topic folks. :)

David, W4SMT 

==========
Doggone right. Only with Unix can you

export CUPSPID=`ps -ef | grep cups | grep -v grep | awk '{print $2;}'`

all on one line. Extra credit: what does this do? Why?
______________________________________________________________
Elecraft mailing list
Home: http://mailman.qth.net/mailman/listinfo/elecraft
Help: http://mailman.qth.net/mmfaq.htm
Post: mailto:[email protected]

This list hosted by: http://www.qsl.net
Please help support this email list: http://www.qsl.net/donate.html

Reply via email to