Your script is working fine, hence the 0. You need to add extra logic to detect the sqlldr failure and propogate that, typically by grepping the log for ORA errors and checking to see if a "bad" file was created.
-craig
"You can never have too many knives" -- Logan Nine Fingers
For the record, I didn't say to grep the bad file, merely checking for its existence is enough. I have been known to grep the actual 'log' file for specific errors as well as check the return code explicitly.
-craig
"You can never have too many knives" -- Logan Nine Fingers