redirect errors to textfile
Posted: 2010-02-20T13:09:48-07:00
IM 6.5.9-8 Q16 Mac OSX Tiger
I have written a script for a client (running Linux). It works standalone, but the client wants to launch it from another tool, webc. It does not work and I am trying to figure out why.
How would I go about sending error messages from the terminal to a text file.
Here is the command it does not like:
convert someimage -quiet -regard-warnings tmp.mpc
I have tried
convert someimage -quiet -regard-warnings tmp.mpc || 2>> errorfile.txt
But that does not seem to catch the errors. They still go to the terminal. Same for 2>&1 and 1>&2
Thanks
P.S.
Any suggestions about configuring IM so that his scripting tool will talk well with IM. It appears that when my bash script is launched from his webc, it fails to run IM convert (properly). I am not enough of a Unix person to know what is wrong. We are trying to look at system error logs to see what that might tell us. But currently it seems to report something like:
convert: unable to open image `./scriptname_1_2670.mpc': \xd0\xa1\x04\b \xc20@h%\xff\xbf
Fred
I have written a script for a client (running Linux). It works standalone, but the client wants to launch it from another tool, webc. It does not work and I am trying to figure out why.
How would I go about sending error messages from the terminal to a text file.
Here is the command it does not like:
convert someimage -quiet -regard-warnings tmp.mpc
I have tried
convert someimage -quiet -regard-warnings tmp.mpc || 2>> errorfile.txt
But that does not seem to catch the errors. They still go to the terminal. Same for 2>&1 and 1>&2
Thanks
P.S.
Any suggestions about configuring IM so that his scripting tool will talk well with IM. It appears that when my bash script is launched from his webc, it fails to run IM convert (properly). I am not enough of a Unix person to know what is wrong. We are trying to look at system error logs to see what that might tell us. But currently it seems to report something like:
convert: unable to open image `./scriptname_1_2670.mpc': \xd0\xa1\x04\b \xc20@h%\xff\xbf
Fred