If you need to pass the exact string
test/(hello) to a program, put it between single quotes:
Every character is interpreted literally between single quotes, except the single quote character itself. If you need a single quote character in the string, pass it as
'\'' (end literal string, quote next character, single quote interpreted literally, start literal string).
echo 'Lasciate ogne speranza, voi ch'\''entrate'
This is unrelated to the error message you show here.
/: is a directory means that you tried to execute
/ as a program. There is presumably a place where you tried to write the full path to a program but left an extra space, as in
There may be other punctuation characters making this less obvious, or control characters in that message. To facilitate debugging, put
set -x on the second line of the script, just after the initial
#! line, so that the shell will print a trace of every line it executes.