#!/bin/bash
ip=`ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'`
cd /home
rm -rf *.sql
mysqldump -u qa -pqatest -A > all.sql
sed -i "s/$1/$ip/g" all.sql
mysql -u qa -pqatest -A < all.sql

