I am looking a way to use variable inside "file=@/my/file/path/from/variable/tshootinginfo.txt" in a bash shell on Debian 9.3.
My CURL request:
curl -s -k -D- -u ${user}:${password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@/my/file/path/from/variable/tshootinginfo.txt" ${jira_subtask}/attachments
I have tried multiple different escapes known to me in a bash, but no much progress. The escape tried:
location_var="/my/file/path/from/variable/tshootinginfo.txt"
-F "file=\"@$location_var\""
-F "file=@\"$location_var\""
-F "file=@\'$location_var\'"
-F "file=@\${location_var}"