Home

Previous Entry | Next Entry

Help with bash script - SOLVED

  • Apr. 24th, 2008 at 10:48 AM
dr calendar
I'm using the script at the bottom of this page:
http://dev.mysql.com/doc/refman/5.0/en/check-table.html

Do any of you bash gurus know how to get it to where I can put in a list of tables not to check? Some of the tables are archive tables and I don't need to know on an immediate basis if those tables are broken after a server crash.

UPDATE: I've moved the script to pastebin so that people can comment on it more easily:
http://pastebin.ca/995893

I tried putting in a section myself to exclude tables but it was EPIC FAIL.

Help me, Obi Wan Livejournal! You're my only hope.

UPDATE: [info]drunkencritch gave me a hand with it and it's working now. It was pretty easy but I didn't know how to approach it... he removed the tables with a grep -v command in line 88. Woo!

Comments

[info]curtisp wrote:
Apr. 24th, 2008 02:58 am (UTC)
set the variable DBEXCLUDE to the list of tablenames separated by spaces

DBEXCLUDE="TABLE1 TABLE2 TABLE3"
[info]dement1a wrote:
Apr. 24th, 2008 02:48 pm (UTC)
no, that doesn't work ... it only excludes databases, not tables.