{"id":1574,"date":"2024-02-07T08:19:44","date_gmt":"2024-02-07T15:19:44","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1574"},"modified":"2024-12-06T07:53:10","modified_gmt":"2024-12-06T14:53:10","slug":"macos-and-the-command-line","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/macos-and-the-command-line\/","title":{"rendered":"MacOS and the command line"},"content":{"rendered":"\n<p>I&#8217;ve spent decades using the Linux command line on a daily basis. Six months ago, I switched to a MacBook Pro as my day-to-day machine, and I&#8217;m still learning to acclimatize. Happily, many of the tools I&#8217;ve grown to love still work on MacOS, either because they&#8217;re shipped with it (ssh, git, python3, bzgrep, zip, less, curl), or because I&#8217;ve installed them with &#8220;<a href=\"https:\/\/brew.sh\/\">brew<\/a> install &#8230;&#8221;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>vim<\/li>\n\n\n\n<li>ripgrep &#8216;rg&#8217;<\/li>\n\n\n\n<li>tree<\/li>\n\n\n\n<li>xz<\/li>\n\n\n\n<li>socat<\/li>\n\n\n\n<li>shellcheck<\/li>\n\n\n\n<li>tcptraceroute<\/li>\n\n\n\n<li>screen<\/li>\n\n\n\n<li>jq<\/li>\n\n\n\n<li>jhead<\/li>\n\n\n\n<li>htop<\/li>\n\n\n\n<li>coreutils<\/li>\n<\/ul>\n\n\n\n<p>Things that are subtly different, and still annoy me:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>find lacks a -mindepth option, so install &#8220;coreutils&#8221; and use &#8220;gfind&#8221;<\/li>\n\n\n\n<li>bash 3 is ancient and doesn&#8217;t work like modern bash 5, so use zsh instead<\/li>\n\n\n\n<li>grep lacks -P. Happily, -E gets me most of what I want, and when it doesn&#8217;t, I use  &#8220;ggrep&#8221; (brew install ggrep) or &#8220;pcre2grep&#8221; (brew install pcre2) instead.<\/li>\n\n\n\n<li>cat doesn&#8217;t respond to CTRL-D, so use CTRL-C instead, or use &#8220;gcat&#8221; from &#8220;coreutils&#8221;<\/li>\n\n\n\n<li>ps is very different, and lacks a &#8211;forest option, so install and use &#8220;pstree&#8221;<\/li>\n\n\n\n<li>zcat doesn&#8217;t use gzip. It handles compress Z files. So use &#8220;bzcat&#8221; , or &#8220;gzcat&#8221; from &#8220;coreutils&#8221;.<\/li>\n\n\n\n<li>no sha256sum, md5sum, etc., so run &#8220;brew install coreutils&#8221; to get them.<\/li>\n<\/ul>\n\n\n\n<p>There&#8217;s far more, under-the-hood, that is different, but I haven&#8217;t run into those things as much, yet. I&#8217;m still more comfortable with Linux, but I&#8217;m glad that &#8220;brew install&#8221; gives me so much. Thank you to the people who maintain &#8216;brew&#8217; and the packages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve spent decades using the Linux command line on a daily basis. Six months ago, I switched to a MacBook Pro as my day-to-day machine, and I&#8217;m still learning to acclimatize. Happily, many of the tools I&#8217;ve grown to love still work on MacOS, either because they&#8217;re shipped with it (ssh, git, python3, bzgrep, zip, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/macos-and-the-command-line\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MacOS and the command line&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-1574","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1574"}],"version-history":[{"count":6,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1574\/revisions"}],"predecessor-version":[{"id":1585,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1574\/revisions\/1585"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}