I have a sql file like below
#!/usr/bin/env bash
cat <<'VERBATIM_SQL'
INSERT INTO t_random VALUES (generate_series(1,9999999999), md5(random()::text));
VERBATIM_SQL
The sql file is getting called like below from a shell script
#!/usr/bin/env bash
./insert.sql | psql -U postgres -p 5432 -h localhost -d vnera
./insert.sql | psql -U postgres -p 5432 -h localhost -d vnera
./insert.sql | psql -U postgres -p 5432 -h localhost -d vnera
On executing I am getting a warning like below
Loop 1./insert.sql: line 5: warning: here-document at line 3 delimited by end-of-file (wanted `VERBATIM_SQL')
Can someone let me know why is this warning coming?
EDIT
I did what was suggested in one of the comments
support@vrni-platform:~/postgres_junk$ dos2unix insert.sql
dos2unix: converting file insert.sql to Unix format ...
But still getting the same warning
./insert.sql: line 5: warning: here-document at line 3 delimited by end-of-file (wanted `VERBATIM_SQL')