I tried to run a shell script “daily_full_expdp_backup.sh” but it was giving me following error
/bin/sh^M: bad interpreter: No such file or directory
Solution was:
Need to execute following script to clean up windows formatting things (spaces) and make it pure linux formated script. after executing following command (with the script) it worked perfectly.see in below screenshot.
$sed -i -e 's/\r$//' daily_full_expdp_backup.sh
Explanation: The ^M is a carriage return character. Linux uses the line feed character to mark the end of a line, whereas Windows uses the two-character sequence CR LF. Your file has Windows line endings, which is confusing Linux. Remove the spurious CR characters using sed -i -e 's/\r$//'
Please see in below image.
5 comments:
OMG! You are a life saver, thanks a kabillion!
OMG! You are my hero!
set fileformat=unix it is just the file formating
set fileformat=unix execute this inside the script. it will allow you to execute the script.
thank you so much - this worked for me in one of the issue that i faced.
Post a Comment