View Single Post
Old 10-23-2013, 06:34 PM   #14
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,058
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Quote:
Originally Posted by paolog View Post
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.

Last edited by rkomar; 10-23-2013 at 06:39 PM.
rkomar is offline   Reply With Quote