Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add comment is working from terminal but not from inside the shell script

Vineet Bansal May 19, 2020

Below command is working from the terminal but when running from shell script it give below error.

curl -D- -u $uname:$token -X POST \

-H "Accept: application/json" -H "Content-Type: application/json" \

"${tkt2}" \

--data @<(cat <<EOF

{

    "body": {

    "type": "doc",

    "version": 1,

    "content": [

      {

        "type":"codeBlock",

        "attrs":{

         "language":"java"

        },

        "content":[

         {

          "type":"text",

          "text":"Testing"

         }

        ]

      }

    ]

  }

}

EOF

)

Error: 

Warning: Couldn't read data from file "<(cat <<EOF

0 answers

Suggest an answer

Log in or Sign up to answer