Quote:
Originally Posted by paolog
btw, what happens if $? isn't zero?
|
It usually means that someone canceled the action (with escape button or otherwise). It can also mean that the wrong arguments were passed to sh_ivtool.app in the first place. I think I just return -1 whenever a proper response isn't available for any reason. I didn't try to return different codes for different errors.
P.S. shell scripting is not easy when you try to do more complicated things. The limitations can make the code quite complex. So, don't feel bad; your code is quite alright.