I'm scripting a file which will change the permissions of a file once it is run. I keep getting these errors on the Cygwin terminal:
$ chmx.bash
/home/user/scripts/chmx.bash: line 2: $'\r': command not found
/home/user/scripts/chmx.bash: line 4: $'\r': command not found
chmod: cannot access ‘chmxtext.txt\r\r’: No such file or directory
Here's my script:
#!/bin/bash
fileName="chmxtext.txt"
chmod a+rwx "$fileName"