I would like to cat the contents of a file.txt and use this as part of the --data field in my curl query.
I tried:
curl ... --data '{ "file_content":[" $(cat file.txt) ", ...]}"' ... but that passes the string $(cat file.txt) to the server rather than interpreting it before sending.
I also tried:
curl ... --data '{ "file_content":[" `cat file.txt` ", ...]}"' ... Again, the passes the string as it is instead of interpreting it.