MySQL Forums
Forum List  »  Newbie

Re: Ascii text boxes disappear when query output is redirected
Posted by: Michael Lueck
Date: August 20, 2010 07:10PM

Great thought, Barry! I think we are getting very close now. Running in interactive mode, indeed it works perfectly.

However I get no output temp file when running it in automated / scripted mode. I do however see the query output on the console. Here is what I now have in the bash script:

#!/bin/bash
MYSQL='/usr/bin/mysql -u uid --password=**** db'
$MYSQL -e 'tee /srv/www/sites/someorg.org/tmp/drupal_404-query.tmp; SELECT DISTINCT `message`, `location`, `referer` FROM `watchdog` WHERE `referer` LIKE "%someorg.org%" AND `type` = "page not found" ORDER BY `location`, `referer`;'

Suggestions of why the tee command would be being skipped yet the query runs in automated / scripted mode?

Thanks much!

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



Edited 1 time(s). Last edit at 08/20/2010 07:12PM by Michael Lueck.

Options: ReplyQuote




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.