Parse

I need a script that will always return an engine of table, which not
depends on the table structure.

I need it to be done exactly from the "show create table ..." statement.
If there is a easiest way, except "show table status", please write.

mysql -u root db -sBe "show create table table"

Table Create Table
table CREATE TABLE `dtt` (\n `id` int(11) DEFAULT NULL,\n `dt` datetime DEFAULT NULL,\n `tp` enum('start','stop') DEFAULT NULL\n) ENGINE=MyISAM DEFAULT CHARSET=latin1

What's wrong with this (for MySQL >=5 IIRC):

$ mysql -u root -NBe 'select engine from information_schema.tables where table_name="user"'
MyISAM

For older versions (with GNU grep):

$ mysql -u root -NBe 'show create table mysql.user'|grep -o 'ENGINE=[^ ]*'
ENGINE=MyISAM

If you want to remove "ENGINE=":

$ engine="$(mysql -u root -NBe 'show create table mysql.user'|grep -o 'ENGINE=[^ ]*')"
$ echo "${engine#*=}"
MyISAM