You have Windows-style line endings.
The no-op command :
is instead read as :<carriage return>
, displayed as :\r
or more fully as $':\r'
.
Method 1
$ dos2unix scriptname
Method 2
$ vi scriptname
:%s/\r$//
:x
References
You have Windows-style line endings.
The no-op command :
is instead read as :<carriage return>
, displayed as :\r
or more fully as $':\r'
.
Method 1
$ dos2unix scriptname
Method 2
$ vi scriptname
:%s/\r$//
:x
References