Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

awk script reading from mysql db?

Status
Not open for further replies.

ianicr

IS-IT--Management
Nov 4, 2003
230
GB
Is there a way to make an awk script query a mysql database rather than looking at a file? eg echo select * from table |mysql -u1234

Thanks
 
echo select * from table |mysql -u1234 | awk -f myAWKscript.awk

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
How about using it in a getline? eg something like:
getline <`echo &quot;select * from table&quot; |mysql -u1234`
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top