Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    S

    Scripting OS X

    scriptingosx.com · Personal blog · on HN since 2019

    Armin Briegel, a Mac admin and developer, writes about shell scripting, command line tools, and automation on macOS.

    Visit blogRSSHN submissions
    Mobile & AppleProgrammingOpen Source & Linux
    What HN says

    Commenters call it a great resource and cite it for details on zsh, bash, sh and dash in macOS, plus the open command and a Swift tool example.

    Stats for nerds
    16HN people shared it
    8linked in comments
    185story points
    Jun 2025last shared
    2020people per year2025

    Top posts on HN

    1. 1
      The unexpected return of JavaScript for automation
      1 person · 73 points · first shared 2021 · 28 comments on HN
    2. 2
      Moving to zsh (2019)
      2 people · 57 points · first shared 2022 · 41 comments on HN
    3. 3
      On env Shebangs
      1 person · 47 points · first shared 2022 · 32 comments on HN
    4. 4
      On viewing man pages (Ventura update)
      1 person · 3 points · first shared 2022 · Discussion on HN
    5. 5
      Moving to zsh
      1 person · 2 points · first shared 2019 · Discussion on HN
    6. 6
      Save up to 25% pkg file size with this weird Monterey trick
      1 person · 1 points · first shared 2021 · Discussion on HN
    7. 7
      An AirTag Adventure, Part 2–Receiving an AirTag
      1 person · 1 points · first shared 2021 · Discussion on HN
    8. 8
      Downgrading a Mac That Shipped with Catalina to Mojave
      1 person · 1 points · first shared 2020 · Discussion on HN
    9. 9
      About bash zsh sh and dash in macos catalina and beyond
      3 people · first shared 2023
    10. 10
      Notarize a command line tool
      2 people · first shared 2020

    What HN people wrote when they linked it

    • 1vuio0pswjnm7Jun 2025

      "bash, obviously for scripting;"

      It's possible to use bash for both interactive use and scripting. For example, this author claims to use bash as his scripting shell.

      But Debian and the popular Debian-derived distributions do not use bash for scripts beginning with "#!/bin/sh", i.e., "shell scripts".

      The interactive shell may be bash, but the scripting shell, /bin/sh, is not bash.

      https://www.man7.org/linux/man-pages/man1/dash.1.html

      https://wiki.ubuntu.com/DashAsBinSh

      https://wiki.archlinux.org/title/Dash

      https://www.oreilly.com/library/view/shell-scripting-expert/9781118166321/c11-anchor-7.xhtml ^1

      https://www.baeldung.com/linux/dash-vs-bash-performance

      https://en.wikipedia.org/wiki/Almquist_shell

      https://lwn.net/Articles/343924/

      https://scriptingosx.com/2020/06/about-bash-zsh-sh-and-dash-in-macos-catalina-and-beyond/ ^2

      I use an Almquist shell, not bash, for both interactive use and scripting. I often write scripts interactively. I use the same scripts on Linux and BSD. I restored tabcomplete and the fc builtin to dash so it feels more like the shell from which it was derived: NetBSD sh.

      1. "This makes it smaller, lighter and faster than bash."

      2. "... this is strong indicator that Apple eventually wants to use dash as the interpreter for sh scripts."

    • throw0101bAug 2023

      > bash was written a decade prior to standardization, and has interesting issues because of this.

      bash can do whatever it wants to do if it's called as "bash". But it should only do specific things when called as "sh". This is true of any shell:

      > When interpreted with dash instead of bash, the same script will fail. This is because dash is much stricter than bash in following the sh standard. Since dash is designed as a minimal implementation of the sh standard, it has to be stricter. The double brackets [[ … ]] are a ‘bashism,’ or a feature only available in bash and other, later shells such as ksh and zsh.

      > Even though zsh also interprets most of these bashisms, zsh in sh compatibility mode is also stricter than bash and will error.

      * https://scriptingosx.com/2020/06/about-bash-zsh-sh-and-dash-in-macos-catalina-and-beyond/

      * https://zsh.sourceforge.io/Doc/Release/Invocation.html#Compatibility

      POSIX.2: Shell and Utilities (IEEE Std 1003.2-1992) is a few decades old now: regardless of when bash development started, I would think that by the 2010s it would have managed to better compartmentalize compatibility and extensions.

    • floatingatollJul 2020

      This error occurs on default macOS when using software precompiled on another computer, when the person who compiled and released that software has not signed up for an Apple Developer account and submitted the precompiled bundle for notarization, one of Apple's anti-malware prevention mechanisms.

      https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution

      You can usually work around it by right-clicking the app and choosing Open, which usually triggers a special approval dialog. You should generally use caution when doing so, as you're granting an arbitrary binary whose contents you are unlikely to verify access to your private data.

      ps. Developers, automating this process as part of your releasing is relatively easy, assuming you have a paid Developer account. The shell script at this link is accompanied by a clear walkthrough, and can be adapted to most workflows run locally on a machine containing your signing keypair. (And if your precompiled binary or bundle was not built with Xcode, you would skip the “xcodebuild” step.)

      https://scriptingosx.com/2019/09/notarize-a-command-line-tool/

    • nierJan 2023

      In ten years everything will be the same because Andreas Wendker told us that Macs will stay Macs the way we know and love them. He’s neither in marketing nor in sales but an engineer so obviously what he says must be the truth, to put it sarcastically.

      «Macs will stay Macs the way you know and love them. They will run the same powerful Pro apps. They will offer the same developer APIs Macs have today. They will let users create multiple volumes on disks with different operating system versions and they will let users boot from external drives. They will support drivers for peripherals and they will be amazing UNIX machines for developers and the scientific community that can run any software they like.»

      Source: https://scriptingosx.com/2020/06/macos-11/

    • foldrApr 2024

      Apple added /bin/dash in Catalina, and the intention is probably to eventually to use dash as the implementation of sh: https://scriptingosx.com/2020/06/about-bash-zsh-sh-and-dash-in-macos-catalina-and-beyond/#:~:text=Apple%20also%20added%20dash%20(but,the%20interpreter%20for%20sh%20scripts.

      As for why they haven't done it yet, I'd guess it's just to preserve backward compatibility with old scripts that rely on quirks of bash's sh compatibility mode.

    • JimDabellJan 2022

      > Will they completely remove bash, rsync, eventually?

      Removing bash is a pretty safe bet. They’ve been making move after move in recent years preparing for it.

      https://scriptingosx.com/2019/06/moving-to-zsh/

    Related

    Scripting Guy Blogdevblogs.microsoft.com/scripting15 people

    Adding a GUI to Powershell Scripts (2014)

    Scripting Guy Blog
    Company · last shared 2026
    Arcanarcan-fe.com103 people

    Arcan versus Xorg – Approaching Feature Parity

    Arcan
    Personal · last shared 2026
    Oils Blogoilshell.org156 people

    Kubernetes is our generation's Multics

    Oils Blog
    Company · last shared 2026
    Wingologwingolog.org237 people

    FFS SSL

    Wingolog
    Personal · last shared 2026
    Vidar Holenvidarholen.net68 people

    Useless Use of "dd" (2015)

    Vidar Holen
    Personal · last shared 2025
    Zwischenzugszwischenzugs.com66 people

    Things I Wish I'd Known About Bash

    Zwischenzugs
    Personal · last shared 2026
    Arm Community Blogcommunity.arm.com147 people

    An update on GNU performance

    Arm Community Blog
    Company · last shared 2025
    Chris Siebenmannutcc.utoronto.ca/~cks388 people

    Go is Google's language, not ours

    Chris Siebenmann
    Personal · last shared 2026