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

Re: Bash question: get output as a variable?



Quoting Stephen Powell on 2010-02-04 18:06:58:
> but in the general case, it's hard to tell.  Since stdout and
> stderr both default to the terminal, and since the doc doesn't
> say, how else would you know other than by trial and error?

Trial and error is an effective way to figure it out. [1] Depending on a
few factors though, it may be more instructive long-term to read the
source. I've recently been putting that philosophy to use in various
things where the documentation's not quite clear. Both methods have
their merits.

[1] possibly redirect std{out,err} to separate temp files and view them?

-- 
 _  Brian Ryans 8B2A 54C4 E275 8CFD 8A7D 5D0B 0AD0 B014 C112 13D0     .
( ) ICQ UIN: 43190205 | Mail/MSN/Jabber: BrianLRyans@gmail.com       ..:
 X  ASCII Ribbon Campaign Against HTML mail and v-cards: asciiribbon.org
/ \ Any technology distinguishable from magic is insufficently advanced.

Attachment: signature.asc
Description: Digital signature


Reply to: