Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
jparker@epsilon.com — — source: Informix-list mailing list archive (1991-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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.