why don't you use $IDB_PATH to rm as well ? this works if you use double quotes instead of single quotes (and even if you remove the quotes completely, I think)