Export a MYSQL column to a plain txt file with no headings

Posted by Kohl Sharples on Stack Overflow See other posts from Stack Overflow or by Kohl Sharples
Published on 2012-09-18T02:51:41Z Indexed on 2012/09/18 3:37 UTC
Read the original article Hit count: 183

Filed under:
|
|
|

So what I'm trying to do is write a script or CRON job (Linux- CentOS) to export the usernames listed in my wordpress database to a simple .txt file with just on username per line. So with the picture, I would like the .txt file to read like this:

  • Sir_Fluffulus
  • NunjaX007

(Except with all the username in the user_login column.)

See screenshot at: http://i.stack.imgur.com/lZQai.png

I have found how to export the entire table to a CVS file, but that contains about 10+ fields (Columns) that I DO NOT what to show up in this text file. Can anyone point me in the right direction on how to do this?

If it helps, this is going to be for exporting users that have signed up on our website (Wordpress) to a whitelist.txt file for Minecraft. Thanks!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about linux