Converting Windows line endings to UNIX
Especially in the case of writing shell scripts. It’s imperative to move from CRLF (Win) to LF (*nix) so they will run.
Try this:
$ dos2unix FILE_NAME.EXT
if that doesn’t work, then try this.
$ sed -i 's/\r$//' FILE_NAME.EXT
Also, make sure you’ve set the permission bits so they can execute.
$ chmod 770 FILE_NAME.EXTPublished on September 3, 2024