I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I have tried the below ways, but both error out with code: 127 (Too many arguments)
Awk-extracted value inside the variable(payloadBlock) looks like:
payloadBlock="<?xml?><root> ... ... (lot of xml data) ... ... </root>";
This would work if I wanted to transmit all output of awk in one HTTP POST.
But if I want to POST each record extracted by awk separately, I have to perform curl from inside the awk script.