MySQL Forums
Forum List  »  Knowledge Base

How to execute a query from Shell script
Posted by: mohamed thasneem
Date: June 21, 2007 01:18AM

echo "select * from <table_name> where <condition>" | mysql -h $IP_ADDR -u $USER_NAME -p$PASSWD $TABLE_NAME > file.txt

I want to store the output of a query to file. I executed the above statement. I am getting an error.

Can u please help me out in this.

Options: ReplyQuote


Subject
Views
Written By
Posted
How to execute a query from Shell script
61802
June 21, 2007 01:18AM


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.