{"id":1763,"date":"2017-12-20T17:51:50","date_gmt":"2017-12-20T09:51:50","guid":{"rendered":"https:\/\/cowmanchiang.me\/wp\/?p=1763"},"modified":"2023-10-31T15:42:23","modified_gmt":"2023-10-31T07:42:23","slug":"linux-more-than-one-commands-after-the-pipe","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1763","title":{"rendered":"[Linux] more than one commands after the pipe"},"content":{"rendered":"<p>Source: <a href=\"https:\/\/askubuntu.com\/questions\/133386\/how-to-merge-and-pipe-results-from-two-different-commands-to-single-command\" rel=\"noopener noreferrer\" target=\"_blank\">How to merge and pipe results from two different commands to single command?<\/a><\/p>\n<p><code> bash test.sh || { curl -X POST 'https:\/\/testurl' -d '{ \"data\": { \"type\": \"type\", \"content\": \"\u6e2c\u8a66\" } }'; exit 1; } <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: How to merge and pipe results from two different commands to single command? bash test.sh || { curl -X POST &#8216;https:\/\/testurl&#8217; -d &#8216;{ &#8220;data&#8221;: { &#8220;type&#8221;: &#8220;type&#8221;, &#8220;content&#8221;: &#8220;\u6e2c\u8a66&#8221; } }&#8217;; exit 1; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-1763","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1763"}],"version-history":[{"count":2,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1763\/revisions"}],"predecessor-version":[{"id":1856,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1763\/revisions\/1856"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}