Don't use variables inside strings, check the $cmd variable to make sure it's correct and @error does not refer to the SHELL command but to READVALUE as SHELL doesn't set the @error.
_________________________
There are two types of vessels, submarines and targets.