如何快速比较查询结果是否一致_转叶大侠

如何快速比较查询结果是否一致

如何快速比较查询结果是否一致




(system@localhost) [tom]> pager md5sum -
PAGER set to 'md5sum -'
(system@localhost) [tom]> select * from users;
6004a48a825ef527b3f090290ba9f0c0  -
1 row in set (0.00 sec)

(system@localhost) [tom]> select * from users;
6004a48a825ef527b3f090290ba9f0c0  -





#将指令输出的内容保存在文件中..
(system@localhost) [tom]> pager cat > /tmp/log.txt
PAGER set to 'cat > /tmp/log.txt'
(system@localhost) [tom]> select now();
1 row in set (0.00 sec)

(system@localhost) [tom]> system cat /tmp/log.txt
+---------------------+
| now()               |
+---------------------+
| 2014-07-23 04:17:17 |
+---------------------+

#将指令输出的内容保存在文件中同时输出到屏幕
(system@localhost) [tom]> PAGER cat | tee /tmp/log.txt

#将指令输出的内容同时输出到屏幕
(system@localhost) [tom]> PAGER tee 
原文地址:https://www.cnblogs.com/kaka100/p/3869555.html