20 Apr 23
rc is a Unix shell I’ve been working on over the past couple of weeks, though it’s been in the design stages for a while longer than that. It’s not done or ready for general use yet, but it is interesting, so let’s talk about it.
19 Apr 23
rc is a Unix shell I’ve been working on over the past couple of weeks, though it’s been in the design stages for a while longer than that. It’s not done or ready for general use yet, but it is interesting, so let’s talk about it.
30 Mar 23
“execline is a (non-interactive) scripting language, like sh - but its syntax is quite different from a traditional shell syntax.”
How do people feel about this compared to rc from Plan 9?
21 Feb 23
14 Jan 23
08 Nov 22
27 Oct 22
#!/usr/bin/env bash
set -o errexit set -o nounset set -o pipefail if [[ “${TRACE-0}” == “1” ]]; then
set -o xtrace
fi
if [[ “${1-}” =~ ^-*h(elp)?$ ]]; then
echo 'Usage: ./script.sh arg-one arg-two
This is an awesome bash script to make your life better.
‘
exit
fi
cd “$(dirname “$0”)”
main() {
echo do awesome stuff
}
main “$@”
This article is about a few quick thumb rules I use when writing shell scripts that I’ve come to appreciate over the years. Very opinionated.
11 Sep 22
28 Jul 22
25 Jul 22
24 Jun 22
22 Jun 22
14 Apr 22
03 Apr 22
15 Jan 22
11 Jan 22
Process substitution is a great little feature and it feels very Unixy, but it took a surprisingly long time to appear in Unix and in shells. This is because it needed a crucial innovation, namely names in the filesystem for file descriptors, names that you can open() to be connected to the file descriptor.