Lets assume the following:
head delete.txt | awk '{printf("curl -XPOST 'localhost:52000/buildings/_search?pretty' -H 'Content-Type: application/json' -d' { '\'"query'\'": { '\'"match'\'": { '\'"building.id'\'" : '\'"%s'\'"} } } '; \n", $1);}'
where the contains some strings and the double quotes have been escaped (") in order to be printed. What about the single quotes .
error message is awk: ^ unterminated string