Resolve Bash Bad Interpreter Error in Terminal on Mac - VicPhanDevOps/mac GitHub Wiki

• The following resolution is for if you receive an error about a bad interpreter when running a Bash script on Mac that was originally written on Windows.
image

• Type sed -i -e ‘s/\r$//’ < script name >.sh and press return key to replace all of the Windows carriage returns in the script with blank spaces.
image

• Type rm < script name >.sh-e and press return key to delete the junk file that created.
image

• Type ./< script name >.sh and press return key to run it successfully this time.
image

⚠️ **GitHub.com Fallback** ⚠️