I run this command to install an update version nodejs on ubuntu 18.04
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - I receive the error "curl option -: is unknown"
I have tried on multiple systems
Because of how specific this error seems to be, and how it exactly fits the original posters example (I too was trying to update nodejs) I am going to assume, like me, the OP was using a digitalocean droplet.
This issue has to do with the virtual console provided by digitalocean.
For some reason when typing or pasting the pipe character | is always converted to a > character.
I am going to SSH in directly to avoid this rather than mess around with the virtual console as I was just being lazy in the first place.
Massive thanks to the poster of this question as it was the same issue, but for a different command: Trying to install DOCKER GPG key recieving error: Curl: option '-' is unknown
Hope this help anyone else who stumbles across this question.