hatch coltraine
2009-10-12 08:03:44 UTC
script current:
create table TABLE{
f1 varchar2,
f2 varchar2,
.
.
.
fN varchar2
}
I'm trying to write a FOR loop that will echo additional lines to the end of the file, so it looks like this:
create table TABLE{
f1 varchar2,
f2 varchar2,
.
.
.
fN varchar2
PF1 varchar2
PF2 varchar2
.
.
.
PFN varchar2
}
assume that I need to add hundreds of flags
Here's my loop:
i=1
while [[$i <= $1]] ;
do
echo "PF_"$i "VARCHAR2(2 BYTE))," >> $2
i=i+1
done
}
$1 = the number of flags the user wants, and $2 is the file that they want to append to
I get this:
A file or directory in the path name does not exist.
make_FLAGS.ksh[8]: =: 0403-016 Cannot find or open the file.
and no output at all. I'm testing this in the directory where $2 resides, and the chmod is all good.
Any ideas?
Thanks!