execute a sql file in postgresql through shell script code example Example: psql execute sql file db=> \i my_script.sql