mapping=(</index_automation/{product}/mapping/Mapping/"$tempmappingfile")
settings=(</index_automation/{product}/mapping/Mapping/"$tempsettingsfile")
dataraw="{{mapping},{settings}}"
creds=$(</index_automation/obj/creds.txt)
reindexfile="/index_automation/${product}/mapping/Mapping/reindex.txt"
IFS=", " read -r -a credArr <<< "$creds"
result=(curl --silent -u {credArr[0]}:{credArr[1]} -X PUT "{credArr[2]}/${indexname}/"
--header "Content-Type: application/json"
--data-raw "$dataraw")
在上面的代码库中,我正在阅读新索引创建的映射和设置。因为--data-raw "$dataraw"
我正在得到
curl: argument list too long
错误。谁能帮我?