#! /bin/bash password_file=~/.backups_cmd/$USER'_mysql' if [ -f $password_file ]; then filecontent=( `cat $password_file`) mysqldump -p${filecontent[1]} -u ${filecontent[0]} --lock-tables=false ${filecontent[2]} | gzip -1 > ~/mysql_dump/${filecontent[2]}.sql.gz fi