Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gratuitous use of echo?



 On Wed, Feb 27, 2008 at 03:04:47PM -0500, John Abreau wrote: 
> You something other than 
> 
>    someprogramthatproducesoutput | awk | sed | etc? 
> 
> What conditions make the above insufficient? 

Typically the output is from some process that has a lot of overhead 
that I don't want to spawn multiple times. 

E.g. running system_profiler on a G4 Mac grinds the CPU for a few seconds, 
and it outputs blocks of text, so I grab the block, stuff it into a 
variable and then I can chop it into useful pieces without having to 
run the command again. 

I could do this with a temporary file, but I avoid temp files as much as 
possible. 

-b 

-- 
half a man's life is devoted to what he calls improvements, yet the 
original had some quality which is lost in the process. 
                                                       <e.b. white> 

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

_______________________________________________ 
Discuss mailing list 
[hidden email] 
http://lists.blu.org/mailman/listinfo/discuss
 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org