Ok i try to grep someting from a file using [exec .... ] - If there is a result then it works great. But if the exec fails i get this:
Tcl error [count]: 0
child process exited abnormally
in Tcl help is written:
(about exec)
So now the Big Question is: how do I catch the error and prevent the script from crashing?If standard output has not been redirected then the exec command returns the standard output from the last command in the pipeline. If any of the commands in the pipeline exit abnormally or are killed or suspended, then exec will return an error and the error message will include the pipeline's output followed by error messages describing the abnormal terminations; the errorCode variable will contain additional information about the last abnormal termination encountered. If any of the commands writes to its standard error file and that standard error isn't redirected, then exec will return an error; the error message will include the pipeline's standard output, followed by messages about abnormal terminations (if any), followed by the standard error output.
i tried several things but in basic I want this:
do [exec ...]
if error { do this }
else { do that }
Thx in Advance