Resolve Bash No Such File or Directory Error in Terminal on Mac - VicPhanDevOps/mac GitHub Wiki

• The following resolution is for if you receive a “No such file or directory” error 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 the 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 the return key to delete the junk file that created.
image

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

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