Play with the --batch and --skip-column-names options to the mysql client:
# mysql -uroot -p -h`hostname` --batch --skip-column-names Enter password: show databases; mysql Hope this helps. Atle On Thu, 19 Dec 2002, Scott Haneda wrote: > And finally, the main question, > mysql> show databases; > +-------------------+ > | Database | > +-------------------+ > | dsadsadsad | > | ewrererrewrerr | > | 324effdfdfd | > | liffdfdsfewfdsake | > | mysql | > +-------------------+ > > As you can see, it is rather simple to get a real up to date list of all > databases, but it is bordered by bars, +'s and -'s, is there any way to > issue a show databases with a flag that tells it to return the database > names in a list, perhaps comma separated or better yet \r separated. This > way, I can create a shell script that will loop through all the databases, > and when I add new databases I need not ever worry about messing with my > backup script. > > Any suggestions of pre-made scripts that would work under OS X would be much > appreciated. > > ------------------------------------------------------------- > Scott Haneda Tel: 415.898.2602 > http://www.newgeo.com Fax: 313.557.5052 > [EMAIL PROTECTED] Novato, CA U.S.A. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php