Forums

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

Need to add the content from a file to the comments

Vineet Bansal May 19, 2020

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":"$result"

         }

        ]

      }

    ]

  }

}

EOF

)

result="$(cat /tmp/$tkt.spl)"

cat /tmp/$tkt.spl

SQL STATEMENT:

------------------------------

INSERT INTO XYZ.INFO VALUES (123, TO_DATE('07-01-1983','MM-DD-YYYY'), 100000, 'Vineet', 'abc@gmail.com', 1234568790);

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_name                              string      abcd

1 row created.

Elapsed: 00:00:00.00

Commit complete.

Elapsed: 00:00:00.00

0 answers

Suggest an answer

Log in or Sign up to answer