I am trying to run the tutorial on https://github.com/FIWARE/tutorials.Time-Series-Data but I can't. Cygwin gives me the following error when I run ./services create:
$ ./services create
./services: line 16: $'\r': command not found
: invalid option 17: set: -
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
./services: line 18: $'\r': command not found
./services: line 30: syntax error near unexpected token $'{\r''
'/services: line 30: loadData () {
It seems like the script has
Windows-style line endings (\r\n or carriage return + line feed) which are causing the problems. I tried the command "dos2unix ./services" but getting the following error:
': not a valid identifierort:
I've even tried wsl with Ubuntu and Alpine distros but still the same error: ': not a valid identifierort:
I am running out of options at this stage so any help would be appreciated.
From the tutorial documentation:
You can verify this by running the tutorial using GitPod directly on a virtual Unix system.
It seems to me that the version you have locally on your Windows box has altered line endings some how - maybe you viewed a file and the editor "corrected" it for you by mistake? You can rectify these issues using the
dos2unixutility.... and repeat on any other file that is still not working for you.