I'll volunteer to help...

Bill Wohler wohler at newt.com
Sat Aug 23 19:22:35 CDT 2003


ruhl at 4dv.net (Robert Uhl) writes:

> Bill Wohler <wohler at newt.com> writes:
>> 
>> 	0 16 * * 5      gnucash --add-price-quotes $HOME/gnucash.xac > /dev/null 2>&1
>> 
>> I've lodged a bug report about suppressing any output with this
>> command, as well as suppressing gratuitous stderr output--the
>> redirection of stdout and stderr to /dev/null shouldn't be necessary
>> here.  The funny thing is I just browsed my bugs at bugzilla and
>> didn't see this, and I see it still isn't fixed in 1.8.4.
>
> Possibly because it's not really a bug?  Run interactively (as I just
> ran it), it's useful to know which stocks are being looked up where

If you're doing this interactively, chances are you're already in
gnucash and can hit the Get Quotes button faster than you can type the
command above. I'd argue that the main use of --add-price-quotes is
for cron and therefore shouldn't send anything to stdout.

I don't have any problems with stdout output if you specify a
--verbose flag.

> of course error output is never gratuitous.

Except when output that really should be sent to stdout is sent to
stderr as is the case here.

> Run from cron, it's simple
> enough to send stdout & stderr to /dev/null

Of course, but this is only a workaround. Most commands that you run
from cron shouldn't have any output at all so that you don't have to
add the redirection in your crontab.

-- 
Bill Wohler <wohler at newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


More information about the gnucash-user mailing list