#!/bin/zsh db=$1 tables=`mysqlshow $db | tail +4 | awk -F\| '{ print $2 }'` for t in ${=tables} do mysqlshow $db $t done