Results 1 to 2 of 2

Thread: Bash mysql format

  1. #1
    Join Date
    Nov 2008
    Beans
    2

    Bash mysql format

    Hey,

    I am writing a program where I would like to get information from mysql database.

    It is a menu driven program and I would like to create a menu from mysql query.
    +----------------+
    | servername |
    +----------------+
    | localhost |
    | Server-1 |
    | Server-2 |
    +----------------+

    These will have the IP address of each server in the table to.

    The question is how do I format each one of the rows in to a string so that I can do (to create a menu etc):

    echo "Server-1"

    and then I will used read to check which server was selected.

    Many Thanks

  2. #2
    Join Date
    Nov 2008
    Beans
    2

    Re: Bash mysql format

    Ok,

    Just worked out how to get them in a nice list using -ss.

    But how can I get each member in the list to become a $string so that I can use it else where?

    Many Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •