{"id":1082,"date":"2020-05-07T20:38:45","date_gmt":"2020-05-07T20:38:45","guid":{"rendered":"https:\/\/jan.schnasse.org\/blog\/?p=1082"},"modified":"2026-09-28T11:38:46","modified_gmt":"2026-09-28T09:38:46","slug":"unix-tools-introduced-today-cat","status":"publish","type":"post","link":"https:\/\/jan.schnasse.org\/blog\/2020\/05\/07\/unix-tools-introduced-today-cat\/","title":{"rendered":"Unix tools introduced. Today: cat"},"content":{"rendered":"<p><span style=\"font-family: andale mono, monospace;\">cat<\/span> is a well known command to concatenate the content of multiple files.\u00a0 Example: <span style=\"font-family: andale mono, monospace;\">cat file1 file2 file3<\/span><\/p>\n<p>But there are other use cases. <span style=\"font-family: andale mono, monospace;\">cat<\/span> offers a nice way to print out multi line strings.\u00a0 It is even possible to include variables into the string, which feels a little bit like using a templating language.<\/p>\n<p>Example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">NAME=ADMIN@COMPANY.COM;\ncat &lt;&lt;EOF\nHello $LOGNAME,\nplease be aware. This system will be under maintenance soon.\nHave a good day.\nSincerely\n$NAME\nEOF<\/pre>\n<p>For more info on the <span style=\"font-family: andale mono, monospace;\">&lt;&lt;EOF<\/span> <a href=\"https:\/\/stackoverflow.com\/questions\/2500436\/how-does-cat-eof-work-in-bash\">visit this SO-Thread<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cat is a well known command to concatenate the content of multiple files.\u00a0 Example: cat file1 file2 file3 But there are other use cases. cat offers a nice way to print out multi line strings.\u00a0 It is even possible to include variables into the string, which feels a little bit like using a templating language. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,4,17],"tags":[],"class_list":["post-1082","post","type-post","status-publish","format-standard","hentry","category-admin","category-bookmarks","category-unixtools"],"_links":{"self":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts\/1082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/comments?post=1082"}],"version-history":[{"count":1,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts\/1082\/revisions"}],"predecessor-version":[{"id":4182,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts\/1082\/revisions\/4182"}],"wp:attachment":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/media?parent=1082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/categories?post=1082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/tags?post=1082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}