For example, I have a foo.ksh:
$ ksh -n foo.ksh
foo.ksh: syntax error at line 141: `}' unexpected
$ ksh -x foo.sh
foo.ksh: template.ksh: line 121: syntax error at line 141: `}' unexpected
$
With `ksh -n' only one line number 140 is mentioned but with `ksh -x'
there're two numbers 121 and 141. How should I understand the 121
number here.
My foo.ksh look like this (note line #134):
120
121 function error
122 {
123 print -u 2 -r - "!!! $*"
124 }
125
126 # fatal [<exitCode>] [<errMsg>]
127 function fatal
128 {
129 typeset errno=1 msg
130
131 if [[ -n $1 && -z ${1//[0-9]/} ]]; then
132 errno=$1
133 shift
134 # fi
135
136 if [[ -n $1 ]]; then
137 print -u 2 -r - "!!! $*"
138 fi
139
140 exit $errno
141 }
142
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users