Skip to main content
added 7 characters in body
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

Your script file is a DOS text file. The extra carriage returns at the end of each line confuses bash (it sees do\r rather than do).

Convert it to a Unix text file using a tool such as dos2unix, or make sure that your editor saves it as a Unix text file.

Your file is a DOS text file. The extra carriage returns at the end of each line confuses bash (it sees do\r rather than do).

Convert it to a Unix text file using a tool such as dos2unix, or make sure that your editor saves it as a Unix text file.

Your script file is a DOS text file. The extra carriage returns at the end of each line confuses bash (it sees do\r rather than do).

Convert it to a Unix text file using a tool such as dos2unix, or make sure that your editor saves it as a Unix text file.

Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

Your file is a DOS text file. The extra carriage returns at the end of each line confuses bash (it sees do\r rather than do).

Convert it to a Unix text file using a tool such as dos2unix, or make sure that your editor saves it as a Unix text file.