Shell script cannot run?

Hi All,

I am new in using opensuse.

I wrote a simple shell script and the following error.

bash: /home/xi/bin/xxx.sh: /bin/sh^M: bad interpreter: No such file or directory

do I need to change the setting in bashrc? or I still do something incorrect.

thanks

Don’t use a DOS/Windows editor to write Linux shell scripts.

Thanks. It works.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In case you just rewrote the script, you can also use something like
dos2unix from the command line to fix the files that came from
windows-land (as all windows-things are inherently broken… :wink: ).

Good luck.

On 07/25/2010 05:36 AM, rature 1497 wrote:
>
> Thanks. It works.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMTLdAAAoJEF+XTK08PnB5tkMP/20Q7Qd3HS61fcR/oMoc+z2f
hNKifDnkMBpftBlZ65nDPxNkWD2fdGcBFaene/FFMuLhXDaBjsW5Itk8HgsCLivf
dvVl11bOMsSQCB7ax8ab2R3SgVw3LzHgMsbHqNBVq4l5Mypcci3fx3kG/XX5DHMF
cDHQPNi5u1gpPWMlfv5OMeSht9pRvlZF3eRkltu6JJ6SCKffSNjnAZPEd5tKpI6+
khOYz0IZn/G3eGcZuleClcINGysNsCwHt+wX8L3ELJZ1BzIk3F4Mod7QNgoVT+Rd
3GPO/KYUHJSphmFOiGbmOM+WF7IqgGFYA+NjXD/191Lq6CyTNbRt6RZoJU6Uc5zQ
Unxz3GAOeT2Id/L3XW0FyaeO4CJ1D5wdiRKOVv5p1BLhHtp4uB2W6b5KEEoarAxu
c5s/WrPZlwbpHOGMyoXH0veHjXzA8k29w4O5B4SnnnUTnzg23KMEoClNsVvI71aV
pQU6/T46fFl56B7Am7baIsshb4B/veVe3rL/H6Xr72r7dO2VrYa0NcgXVlqE1nlt
QLO6AEgGJaOPuBuZETd3gbPClESA/vJz0s075D4AyH+ymWGgMNnLA6HKxytYvEgI
ovdSAA4a252l3EiOkRp1EKboEUU0j42hlFaLLPdInbv2pglbESvZsS6PQ1qUYmo8
zNDWGtQCcHja/M1K31HM
=GWzv
-----END PGP SIGNATURE-----