.sh error: ***.sh: 2: set: Illegal option – Solution

Q:
Terminal running .sh error: ***.sh: 2: set: Illegal option-
A:
solution: Remove trailing \r character that causes this error!

command:

sed -i 's/\r$//' filename

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *