Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!crdgw1!ge-dab!tarpit!fang!att!cbnewsd!knudsen From: knudsen@cbnewsd.att.com (michael.j.knudsen) Newsgroups: comp.os.os9 Subject: SILENT ERROR exits SHell script? Keywords: OSK shell bug Message-ID: <1991Jun4.230458.25390@cbnewsd.att.com> Date: 4 Jun 91 23:04:58 GMT Organization: AT&T Bell Laboratories Lines: 28 Strange thing is happening in OSK on my MM/1. If I run the DIFF utility in a shell script, it runs fine but immediately exits the script upon completion. No error message at all -- it just acts as if the script had reached normal EOF. I have not yet tried setting -x to see whether DIFF really is returning a "silent" error code, but that is so far my only theory. I know that non-zero error returns will exit a shell script, but they always print at least the error number. How is it that DIFF can break out of the script with no error message? I don't know where this DIFF came from (Microware, or PD, or what), but it has another bug that may be related. If you type just "diff" with no arguments, it responds with diff: use: diff file1 file2 ERROR 000:002 Keyboard Abort or whatever OSK says for when you hit the BREAK key. I understand this DIFF is buggy and should be replaced with a better version. But just for my education, how can it *silently* force the Shell to exit the script? Thanks, mike k -- "What America needs is A Thousand Points When Lit..." knudsen@ihlpl.att.com