I am creating a script that backups a mysql db using the mysqldump utility. I am writing this script in the shell "sh". I would like to capture the output status of mysqldump in the script (i.e. if the mysqldump command failed or succeeded) so I can report if the script was successful or not.
- Does mysqldump return an output status?
- Can someone please give me instructions on how to do this?
$ mysqldump .......... && echo "Yes"Replace the...part with the parameters. If the command is successful it will showYesotherwise nothing will be shown – Manish Sinha Mar 21 '11 at 14:34shis a symlink todashin Ubuntu. – Lekensteyn Mar 21 '11 at 15:21