The content of the shell script is like this :
date
cur_date=`date '+%Y-%m-%d'`
cur_time=`date '+%Y-%m-%d %H %M %S'`
start_date='2014-01-01'
end_date=`date '+%Y-%m-%d'`
FiveDaysBack=`date --date='-7 day' "+%Y-%m-%d"`
rm -f *.sql
mysqldump -h192.168.200.150 torr > torr1.sql &
mysqldump -h192.168.200.100 torr > torr2.sql &
...
...
...
wait && echo `date` complete.
I'm running this script as :
nohup sh etl.sh &
Executing the script results in all the sql dump going into the nohup.out file and not to the torr1.sql, torr2.sql et all. So I get a huge nohup.out file where I wanted the dump to go the torr.sql files.
Please note that this script does a lot more than this and I'm not looking for an alternate arrangement for obtaining mysql dumps. All I'd like to know is why is the mysqldump output not going into the specified files and instead being directed to nohup.out. I'd like to resolve just that.