First, I'll assume that the script you are trying to execute runs problem-free from which ever userid invoked the Informix instance (ie. informix or root).
Second, as opposed to invoking the script as an executable (ie. ./test.sh) you might try invoking a shell to run the script (ie. sh ./test.sh). The environment that the system command executes in might not have a proper default shell "wired" into it.