Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsh!ijk From: ijk@cbnewsh.ATT.COM (ihor.j.kinal) Newsgroups: comp.unix.questions Subject: Debugging ksh scripts Keywords: error location,chained shell scripts Message-ID: <1844@cbnewsh.ATT.COM> Date: 30 Jun 89 20:38:24 GMT Distribution: na Organization: AT&T Bell Laboratories Lines: 37 I'm trying to debug an error from a chain of about 6 shell scripts [one calls the next, and each call a setup script]. The error only occurs when a certain execution path is chosen, but unfortunately, I can't discover why that does make a difference. I believe the error is coming from the setup script, but when I I turn on execution trace in that script, the error seems to go away. The error is : [82]: test - argument expected I've looked at lines 82 in my scripts, and I can't spot any test statement or of course, the alternative [ ] . Questions: 1) is the line number indicative of the line number - or can comments or something else change that line number????. 2). is there any way to force the script to identify itself by name, and/or context when it encounters an error? 3). Can something else produce this error message, except what I expect?? { i.e., test or [ ] }? I'm using ksh 86,[ on a HP 850] although a version of the latest 88 might be available. Any thoughts are appreciated - this has been driving me bonkers!!! [well, at least it's an excuse ] Thanks, Ihor Kinal [att!violin!ijk] cbnewsh!ijk