Cal Evans wrote:
> 
> mysqldump products >products.sql
> grep s/products/products1/ < products.sql > products1.sql
> mysql < products1.sql
> 
> Assuming that nothing else in the database is named products. (i.e. you
> don't have any fields or tables named products) If you did have fields or
> tables, you would most likely have to make the edits by hand to
> products.sql.
> 
> or in keeping with my 'dangerous ideas' theme:
> 
> mysqldump products | grep s/products/products1/ > mysql
> 
> (I am rusty on my regex so I'd check that s// expression before I used it)
> 

You'd want to use sed, not grep.




-- 
Jack Challen
Technical Consultant
OCSL
http://www.ocsl.co.uk/

---------------------------------------------------------------------
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

Reply via email to