如何在bash中执行多行命令?

时间:2018-04-11 16:37:46

标签: bash macos curl

如何在OSX上的bash中运行多行命令?

curl https://sandbox.checkout.com/api2/v2/customers/cust_8AB7845C-35D6-4BAD-BED0-D0D7F75C50F0/cards
    -H "Authorization: sk_093F4C8D-E608-4B8D-9B39-8C2491345864" 
    -H "Content-Type:application/json;charset=UTF-8"
    -X POST 
    -d '{
           "name" : "Miss Matt Quigley",
           "number" : "4242424242424242",
           "expiryMonth" : "06",
           "expiryYear" : "2018",
           "cvv" : "100",
           "billingDetails" : {
              "addressLine1" : "56 Layla Rue",
              "addressLine2" : "Junius Plain",
              "city" : "PortDeclan",
              "country" : "US",
              "phone" : {
                 "countryCode" : "44",
                 "number" : "12345678"
              },
              "postcode" : "ei104xh",
              "state" : "Anthony"
           }
        }'

当我将其粘贴到我的bash中时,格式会发生变化,因此无法运行。

0 个答案:

没有答案