> -----Original Message----- > From: Josh Howe [mailto:[EMAIL PROTECTED] > Sent: November 1, 2004 12:31 PM > To: [EMAIL PROTECTED] > Subject: mysqldump > > > > Hi, > > > > Can anybody help me with a linux newbie question. I want to > use mysqldump to backup all of the tables in a database that > start with z_. > Can I do this in linux with a single line? Thanks. > >
#!/bin/bash TABLES=`echo "show tables" | mysql -pyourpassword -hlocalhost your_db`; for table in $TABLES do # set your condition below if [ "$table" = "" ];then echo $table mysqldump your_db $table >/path/to/dump/$table fi done _____________________________ Steve Poirier -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]