I am trying to run a simple piece of shell script which return No such file or directory while executing the statement from command line works perfect.
Any leads ??
You have a
\r at the end of
/bin/bash so it's trying to run
/bin/bash\r which does not exist. Use just
\n to terminate lines, like from a
dos2unix tool or similar if you have it available.
That will also fix the
\r at the end of your
\r in the shebang line isn't actually coming into play yet because you're invoking it as
bash test.sh so it isn't using it, but it's the same problem