Comment

Comment by BoingBoomTschak

>such as MacOS, that are fully compliant with the POSIX standard

Until you have to gets your hands dirty and find small and bigger faults everywhere. For example, /bin/sh defaults to their ancient (last GPL2 release) bash that doesn't work properly in these two parameter expansion cases:

  $ cat test.sh
  var=
  echo "${var+{\}}"
  cat <<EOF
  ${var+\"z\"}
  EOF
  $ /bin/sh test.sh
  {\}
  \"z\"
  $ /bin/dash test.sh
  {}
  "z"
Second one bit me quite badly when doing heredocs to generate JSON.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton