{"id":27,"date":"2013-08-06T15:39:00","date_gmt":"2013-08-06T15:39:00","guid":{"rendered":"https:\/\/www.root42.de\/blog\/?p=27"},"modified":"2013-08-06T15:39:00","modified_gmt":"2013-08-06T15:39:00","slug":"how-to-read-input-from-a-bunch-of-commands-in-bash","status":"publish","type":"post","link":"https:\/\/www.root42.de\/blog\/?p=27","title":{"rendered":"How to read input from a bunch of commands in bash"},"content":{"rendered":"<p>You can use the <span style=\"font-family: Courier New, Courier, monospace;\">&lt;( &#8230; )<\/span> subshell syntax to read from a bunch of commands, that you whip up on the fly:<\/p>\n<pre><br \/>cat < <( echo \"foo\"; sleep 2; echo \"bar\" )<br \/><\/pre>\n<p>You can use this for example for <a href=\"http:\/\/stackoverflow.com\/questions\/14959461\/how-to-talk-to-imap-server-in-bash-via-openssl\">accessing IMAP servers<\/a>, which need a short delay during login.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use the &lt;( &#8230; ) subshell syntax to read from a bunch of commands, that you whip up on the fly: cat <\n<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27,10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/27"}],"collection":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":0,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}