{"id":6168,"date":"2022-06-02T09:29:16","date_gmt":"2022-06-02T09:29:16","guid":{"rendered":"https:\/\/really.zonky.org\/?p=6168"},"modified":"2022-06-02T09:29:21","modified_gmt":"2022-06-02T09:29:21","slug":"when-is-a-command-line-application-not","status":"publish","type":"post","link":"https:\/\/really.zonky.org\/?p=6168","title":{"rendered":"When Is a Command-Line Application Not?"},"content":{"rendered":"\n<p>It sometimes seems that every time I dive into a Youtube video promising &#8220;${N} Awesome CLI Applications&#8221; (or equivalent), that most of the suggested applications are not command-line applications. They&#8217;re TUI-applications &#8211; <em>text user interface<\/em> as opposed to <em>graphical user interface<\/em> &#8211; or to align with my bad habit of referring to GUI applications as <em>gooey applications<\/em>, perhaps <em>tooey applications<\/em>.<\/p>\n\n\n\n<p>Now there&#8217;s nothing wrong with tooey applications; I use them every day. Especially <em>nmon<\/em> (just because I got used to it before I discovered <em>htop<\/em>). Or <em>btop<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"292\" src=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?resize=695%2C292&#038;ssl=1\" alt=\"\" class=\"wp-image-6170\" srcset=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?resize=1024%2C430&amp;ssl=1 1024w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?resize=300%2C126&amp;ssl=1 300w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?resize=768%2C323&amp;ssl=1 768w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?resize=1536%2C646&amp;ssl=1 1536w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?resize=2048%2C861&amp;ssl=1 2048w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1009.png?w=1390&amp;ssl=1 1390w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><figcaption>Screenshot of btop running<\/figcaption><\/figure>\n\n\n\n<p>But none of these are really command-line applications; by which I mean they aren&#8217;t used at the command-line even if they are (optionally) invoked there. A command-line application allows you to use the shell including pipes to produce an aggregate result. For example :-<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u00bb grep mike \/etc\/passwd | awk -F: '{print $5}'\nMike Meredith<\/code><\/pre>\n\n\n\n<p>That uses two command-line &#8220;applications&#8221; to turn a username (&#8220;mike&#8221;) into a full name (&#8220;Mike Meredith&#8221;). Yes it can be optimised into a single command :-<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u00bb awk -F: '\/^mike:\/ {print $5}' \/etc\/passwd\nMike Meredith<\/code><\/pre>\n\n\n\n<p>\u2026 which even improves the search, but makes the point less well. And we can do slightly fancier things too :-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"89\" src=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1025.png?resize=695%2C89&#038;ssl=1\" alt=\"\" class=\"wp-image-6172\" srcset=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1025.png?resize=1024%2C131&amp;ssl=1 1024w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1025.png?resize=300%2C38&amp;ssl=1 300w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1025.png?resize=768%2C98&amp;ssl=1 768w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-06-02_1025.png?w=1211&amp;ssl=1 1211w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><figcaption>Screenshot of a random URL being picked and turned into a QR code.<\/figcaption><\/figure>\n\n\n\n<p>(don&#8217;t assume that QR code takes you somewhere nice)<\/p>\n\n\n\n<p>I&#8217;m not suggest Youtubers should stop making videos about terminal-based applications; I&#8217;m not even suggesting they should concentrate on &#8220;proper&#8221; command-line applications. Just don&#8217;t call terminal-based applications &#8220;command-line&#8221; because they really are not.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It sometimes seems that every time I dive into a Youtube video promising &#8220;${N} Awesome CLI Applications&#8221; (or equivalent), that most of the suggested applications are not command-line applications. They&#8217;re TUI-applications &#8211; text user interface as opposed to graphical user interface &#8211; or to align with my bad habit of referring to GUI applications as <a href='https:\/\/really.zonky.org\/?p=6168' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"1"},"categories":[4,209],"tags":[1793,2067,1792,1794,2098,2097],"class_list":["post-6168","post","type-post","status-publish","format-standard","hentry","category-it","category-linux-it","tag-cli","tag-command-line","tag-gooey","tag-gui","tag-terminal-based","tag-tui","category-4-id","category-209-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"share_on_mastodon":{"url":"https:\/\/mstdn.social\/@grumpygrimnir\/108407171382051421","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1f2KI-1Bu","_links":{"self":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/6168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6168"}],"version-history":[{"count":2,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/6168\/revisions"}],"predecessor-version":[{"id":6173,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/6168\/revisions\/6173"}],"wp:attachment":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}