0
私はcsvファイルを読み込み、riakに自分のデータを挿入するために使用しているこのbashスクリプトを持っています。Curl:riakを使用してホストを解決できませんでした
#!/bin/bash
# Set "," as the field separator using $IFS
# and read line by line using while read combo
while IFS=',' read -r Num_Acc senc catv occutc obs obsm choc manv num_veh
do
eval curl -i -X POST http://127.0.0.1:8098/riak/vehicule -H "Content-Type:application/json" -d {"Num_Acc":"$Num_Acc","senc":$senc,"catv":"$catv","occutc":"$occutc","obs":"$obs","obsm":$obsm,"choc":$choc,"manv":"$manv","num_veh":"$num_veh"}
done < vehicules_2016.csv
問題は、私はこのエラーを持って、それから来ることができどこ私はkownないということです。
curl: (6) Could not resolve host: senc
curl: (6) Could not resolve host: catv
curl: (6) Could not resolve host: occutc
curl: (6) Could not resolve host: obs
curl: (6) Could not resolve host: obsm
curl: (6) Could not resolve host: choc
curl: (6) Could not resolve host: manv
curl: (3) Illegal characters found in URL
HTTP/1.1 201 Created
Vary: Accept-Encoding
Server: MochiWeb/1.1 WebMachine/1.10.9 (cafe not found)
Location: /riak/vehicule/NiuPBkgCFBaqUNhorovnBvix2ED
Date: Mon, 13 Nov 2017 11:43:08 GMT
Content-Type: application/json
Content-Length: 0
私は問題はJSONの構文かもしれないと思います。
ありがとうございました。