Welcome on board,
We are missing what shell, language, OS and their versions you are using...
in \(select tname from tab where REGEXP_LIKE(TNAME,\'\_H$\'\))\"
From what I see above, not knowing the language I would say after REGEXP_LIKE either \ is missing on all the following brackets but one, or if this part is correct the protected bracket H$\'\)) is the wrong one, should be the next one