#!/bin/bash
mysql -uroot -pwelcome1 < /home/sai/first.sql
echo "The program has completed"
I am trying to call a sql file from shell script ,I am running the script as bash run.sh
, but it telling that there is no such directoryfirst.sql, but if i run that command separately as mysql -uroot -pwelcome1 < /home/sai/first.sql
, it is working, is there a different way to write?