The trouble is, I just barely have a grasp on shell programming and I can only spell
piethon.
Jason ([EMAIL PROTECTED]) wrote:
>
>Aggh, you've just sparked an old suppressed memory.
>
>I had to build this huge BIND install and hardening
>script one time. I created a function for just about
>every task in the script and used a function like that
>to check return values. In each of the task functions,
>I'd set a variable for function name (func_name).
>
>Something like:
>
>check_return ()
>{
> if [ $? -ne 0 ]
> then
> echo "$func_name went foobar"
> else
> echo "A-OK"
> fi
>}
>
>I'm no shell guru. Isn't there a better way to do
>error checking in huge shell scripts? Or is the
>answer:
>
>"Use python"
>
>Damn python bigots.
>
>See y'all tonight.
>
>Jason
>
>Garl wrote:
>>
>>Another way to do this would be to assign $? to a
>>variable and test the variable. That way you can add
>>logic to your script to return the error code and
>what >it means. This is nice when you are trying to
>figure >out why your script failed 2 years after you
>wrote it.
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>_______________________________________________
>EuG-LUG mailing list
>[EMAIL PROTECTED]
>http://mailman.efn.org/cgi-bin/listinfo/eug-lug
>
--
Assured Computing
When you need to be sure.
[EMAIL PROTECTED]
www.assuredcomp.com
Voice - 541-868-0331
FAX - 541-463-1627
Eugene, Oregon
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug