MySQL Forums :: Newbie :: Ascii text boxes disappear when query output is redirected


Advanced Search

Re: [SOLVED!] Ascii text boxes disappear when query output is redirected
Posted by: Michael Lueck ()
Date: August 21, 2010 03:25PM

Ken Butcher gets the prize for the correct answer!

Ken Butcher wrote:
> If you want to retain the table formatting, use the --table (-t) option

His site I found quite useful:
http://mainstreetanswers.org/bashs.php
and his answer solved the mystery of where the ascii art table was disappearing to.

The working syntax is as follows:

#!/bin/bash
MYSQL='/usr/bin/mysql -u uid --password=****** db'
$MYSQL -te 'SELECT DISTINCT `message`, `location`, `referer` FROM `watchdog` WHERE `referer` LIKE "%orgname.org%" AND `type` = "page not found" ORDER BY `location`, `referer`;'

And usage is as I posted originally:

./drupal_404-query.sh 2>&1 | /usr/bin/mailx -s "Test Query Email" root

Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Options: ReplyQuote


Subject Written By Posted
Ascii text boxes disappear when query output is redirected Michael Lueck 08/20/2010 11:07AM
Re: Ascii text boxes disappear when query output is redirected Shawn Taylor 08/20/2010 02:07PM
Re: Ascii text boxes disappear when query output is redirected Michael Lueck 08/20/2010 02:53PM
Re: Ascii text boxes disappear when query output is redirected Barry Galbraith 08/20/2010 06:14PM
Re: Ascii text boxes disappear when query output is redirected Michael Lueck 08/20/2010 07:10PM
Re: Ascii text boxes disappear when query output is redirected Michael Lueck 08/20/2010 08:25PM
Re: Ascii text boxes disappear when query output is redirected Barry Galbraith 08/20/2010 11:05PM
Re: Ascii text boxes disappear when query output is redirected Michael Lueck 08/21/2010 05:29AM
Re: Ascii text boxes disappear when query output is redirected Barry Galbraith 08/21/2010 05:31AM
Re: Ascii text boxes disappear when query output is redirected Michael Lueck 08/21/2010 05:40AM
Re: [SOLVED!] Ascii text boxes disappear when query output is redirected Michael Lueck 08/21/2010 03:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.