I have created a script file psql_run, but when I run this script file using ./psql_run, it gives permission error.
You need to change the permission of the file using the following command:
chmod 775 psql_run
If you do not want to change the permission, run the following command:
sh psql_run