Tag Archives: curl (3) Illegal characters found in URL

curl (3) Illegal characters found in URL

Explain the function of static keyword and final keyword in Java in detail>>>

Abstract

When a file edited in windows is uploaded to Linux, a curl: (3) illegal characters found in URL error will be reported when using curl and other tools. This is because Linux and windows add different line breaks in text files. Linux will only add one to each line, and windows system will add after each line, so this problem will occur when files under windows are placed on Linux

solutions

Convert file

tr -d '\r' < test.sh > testWithoutR.sh

When executing in a script

Delete

URL=${URL%$'\r'}