[Elecraft] Firmware upgrades using Ubuntu 12.04

David Fleming dflem at yahoo.com
Tue Jul 10 20:42:45 EDT 2012


> 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?


More information about the Elecraft mailing list