Mysql-e and v simplify code bitsCN.com
Simplified mysql-e and v code
When using mysql-e to generate a result and import the specified file:
● To display the statement itself at the same time:-v
● To increase the number of rows in the query result:-vv
● To increase the execution time:-vvv
Some monitoring scripts can be used to simplify code
[Plain]
(I) test without v:
[Mysql @ even ~] $ Mysql-uroot-poracle-e "select version (); select now ()">/home/mysql/test. SQL
[Mysql @ even ~] $ Cat/home/mysql/test. SQL
VERSION ()
5.5.16-log
NOW ()
18:06:35
(II) with a v test:
[Mysql @ even ~] $ Mysql-uroot-poracle-e "select version (); select now ()"-v>/home/mysql/test02. SQL
[Mysql @ even ~] $ Cat/home/mysql/test02. SQL
--------------
Select version ()
--------------
VERSION ()
5.5.16-log
--------------
Select now ()
--------------
NOW ()
18:08:40
(3) two v tests:
[Mysql @ even ~] $ Mysql-uroot-poracle-e "select version (); select now ()"-vv>/home/mysql/test03. SQL
[Mysql @ even ~] $ Cat/home/mysql/test03. SQL
--------------
Select version ()
--------------
VERSION ()
5.5.16-log
1 row in set
--------------
Select now ()
--------------
NOW ()
18:14:05
1 row in set
Bye
(Iii) three v tests:
[Mysql @ even ~] $ Mysql-uroot-poracle-e "select version (); select now ()"-vvv>/home/mysql/test04. SQL
[Mysql @ even ~] $ Cat/home/mysql/test04. SQL
--------------
Select version ()
--------------
+ ------------ +
| VERSION () |
+ ------------ +
| 5.5.16-log |
+ ------------ +
1 row in set (0.00 sec)
--------------
Select now ()
--------------
+ --------------------- +
| NOW () |
+ --------------------- +
| 18:14:49 |
+ --------------------- +
1 row in set (0.00 sec)
Bye
BitsCN.com