linux - Calling script from shell script - getting command not found -



linux - Calling script from shell script - getting command not found -

i new shell scripting. trying work through this.

> script execute in cron (util.sh) #!/bin/sh host='ahostname' port='3306' user='auser' pass='apassword' db='adatabase' . /mnt/stor/backups/backup.sh

(i tried source /mnt/stor/backups/backup.sh)

> script execute (backup.sh)

when backup.sh called (it called) appears parsed , not executed. no matter set in messages like:

/mnt/stor/backups/backup.sh: line 8: date: command not found /mnt/stor/backups/backup.sh: line 8: mysqldump: command not found /mnt/stor/backups/backup.sh: line 8: tar: command not found /mnt/stor/backups/backup.sh: line 8: rm: command not found

the thought have domain localized file, execute variables, , phone call master script uses variable dirty work. because of limitations 1 of hosts , multiple domains best method.

the script problem seems /mnt/stor/backups/backup.sh. seek setting path include usual directories binaries, script can find tools. or, better, alter /mnt/stor/backups/backup.sh , utilize absolute paths in commands /bin/rm instead of 'rm'.

linux perl shell

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -