Home For Mysql, how can "boxing" of output be suppressed when using -e?
Reply: 0

For Mysql, how can "boxing" of output be suppressed when using -e?

daveg
1#
daveg Published in 2018-02-14 17:05:37Z

I want to make a quick query that'll return one record from a mysql DB from the linux command line. I am planning on using "mysql -e". Works fine except that it returns hyphens, vert bars and plus signs to "box" the output. Example...

% mysql -h whatever -u whatever -p<whatever> mydb -N -e "select finish from 
the_table where status like 'PASS%' order by start desc limit 1"
+---------------------+
| 2018-02-13 19:57:30 |
+---------------------+

Is there a way to suppress all the hyphens, very bars and "+" signs and just get...

2018-02-13 19:57:30

I found -N suppressing the header (that was good) but didn't see anything obvious to suppress the "boxing".

I suppose I could awk and sed it into submission, but I was looking for something simpler.

Thanks in advance

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.3062 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO