#!/bin/sh# count_rows.sh - count rows in cookbook database table# require one argument on the command lineif [ $# -ne1 ]; thenecho"Usage: count_rows.sh tbl_name";exit1;fi# use argument ($1) in the query stringmysqlcookbook<<MYSQL_INPUTSELECT COUNT(*) AS 'Rows in table:' FROM $1;MYSQL_INPUT