Re: how dbaccess using in FOR circle of UNIX script
Posted in 1998
1 - for LOOP, not circle - same concept though.
2 - remove the indentation on the 'EOF'
for i in `cat file`
do
dbaccess ... <<EOF
SELECT * ...EOF
done
the problem is that the shell is looking for ^EOF and you're providing it "
EOF" or "\\tEOF"
cheers
j.
Please respond to jjdai@pek-co.cn.dhl.com
To: informix-list@rmy.emory.edu
cc: (bcc: Jack Parker/Boston50/Epsilon)
Subject: how dbaccess using in FOR circle of UNIX script
I want to use a for circle to change a variable in a
sql statement but system tell me the EOF not matched
if I donot use for circle the statement will run
correctly. can you help me?
example:
for i in `cat station_name`
do
dbaccess DBNAME <<EOF
select statement
EOF
donethe system warning that the EOF not matched
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet