First, read
this to understand why you're have difficulty with angle brackets. And a hint to everyone, I clicked on "quote" for his original post to see his original input. That way I could that his here-document was correct.
rooh, I would have sworn that I knew everything about ksh. But I have never seen your "for" statement syntax before. I tested it and it works. I looked in
The New Kornshell Command and Programming Language by Morris Bolsky and David Korn. It's not there. They only show
for i in $list
do
done
and they never mention
for i in $list
{
}
Where did you get this syntax??
You really posted a fragment of a script so it's hard to do anything but visually inspect. But here is something that looks like a double loop waiting to happen:
Quote:
Originally posted by rooh
for record in `cat $bpfile`
{
acode1=`awk '{print $2 }' $bpfile`
ename=`awk ' {print $1 }' $bpfile`
dept1=`awk '{ print $6 }' $bpfile|cut -c 1 `
I think that you either want to lose that "for" loop or crack "record" up into acode1, ename, and dept1.