Page 1 of 1

Bashscript: Pipe errors and warnings to variable or file

Posted: 2010-02-07T04:57:33-07:00
by humbleweed
I'm using IM also for quality management in several digitisation projects. I.e. writing image attributes to csv files or to db tables or comparing image data to given profiles.
A problem is catching errors and warnings in a conveniant way. I found no way to write these messages to destinations other than to the primary terminal window.

Does anybody know about ways to write errors and warnings to variables or files?

Hunbleweed

Re: Bashscript: Pipe errors and warnings to variable or file

Posted: 2010-02-07T08:12:33-07:00
by magick
The ImageMagick API provides methods for an alternative exception handler. From the command line you must use your shell features to redirect the errors / warnings to another process or a file on disk. The method depends on the OS and shell you are using.

Re: Bashscript: Pipe errors and warnings to variable or file

Posted: 2010-02-07T12:33:54-07:00
by fmw42
try

convert.... 2>&1 error.txt