0

when using the following command:
url="http://localhost:8086/writedb=speedtest&u=${INFLUXDB_USERNAME}&p=${INFLUXDB_PASSWORD}" and then echo "${url}"

Before I use source .env to load my variables from the file:

INFLUXDB_USERNAME=admin
INFLUXDB_PASSWORD=admin

Leads to:

&p=adminocalhost:8086/write?db=speedtest&u=admin
curl: (3) Illegal characters found in URL

2 Answers2

0

Solution: instead of source .env

source <(sed $'s/\r$//' .env)
0

If your .env file was created in Windows you can convert it using

dos2unix .env
source .env
Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134