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
Bashscript: Pipe errors and warnings to variable or file
-
- Posts: 1
- Joined: 2010-02-03T07:51:27-07:00
- Authentication code: 8675309
Re: Bashscript: Pipe errors and warnings to variable or file
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Bashscript: Pipe errors and warnings to variable or file
try
convert.... 2>&1 error.txt
convert.... 2>&1 error.txt