F
F
fokin_nikolay19892016-03-14 21:59:16
linux
fokin_nikolay1989, 2016-03-14 21:59:16

How to execute a script in BASH?

Can you tell me how to execute a script in bash? Firebird database
If I execute it in ib expert, then everything goes with a bang!
but if I execute under isql in this way /opt/RedDatabase/bin/isql baza -i n.sql
and there is a script in n.sql itself, then an error occurs

Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 3, column 35
After line 0 in file n.sql
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-begin
At line 4 in file n.sql
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-for
At line 29 in file n.sql
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-for
At line 47 in file n.sql
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-for
At line 54 in file n.sql
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-for
At line 59 in file n.sql
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 1
-for
At line 64 in file n.sql

Index activation was successful

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
fokin_nikolay1989, 2016-03-15
@fokin_nikolay1989

found the solution is to set term ^; then use the executor block script to execute completely, while you need to set the encoding win1251 /bin/isql ncore -i script.sql -ch win1251 when executing isql

A
Alexey S., 2016-03-14
@Winsik

check n.sql file encoding

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question