Can you please run : [oracle@visionerp ]$ ./cold_bkp.sh
No I can't it opt out error too.
-bash: ./cold_bkp.sh: /bin/sh ^M: bad interpreter: No such file or directory
Thanks & Regards
Go to script location and check permission.
Please check following command:
For example in my system:
bash-3.2$ cd /
bash-3.2$ cd anar/
bash-3.2$ ls -la
drwxr-xr-x 2 oracle oinstall 512 Jul 30 19:09 .
dr-xr-xr-x 32 root bin 1024 Sep 9 09:33 ..
-rwxr-xr-x 1 oracle oinstall 654 Sep 25 14:58 check_standby.sh
-rwxrwxrwx 1 oracle oinstall 890 Nov 20 2012 log_isle_KS.sh
-rwxrwxrwx 1 oracle oinstall 460 Jul 30 19:08 start_standby.sh
-rw-r--r-- 1 oracle oinstall 32282 Jul 26 17:49 tt_prod.sql
The ownership & permissions are okay but I noticeed I'm not running bash-3.2$ just like your output above.
I see this : ^M: bad interpreter. Can you vi your file and see if you have ^M character ?
you may need to remove this. Dont do it manually.
follow any of the links below :
Thank you Karan & Anar for help.
Actually I typed script in notepad and then moved it to linux machine, that's why it was not executing and also showing error '^M: bad interpreter'.
Thanks for letting us know.
to remove ^ M from a file to be run
then execute the file
. / name_file