Shell Usage
Clear the shell’s cache of resolved binaries
hash -r
This is particularly useful after installing go binaries that override locally installed binaries (such as the version of hugo used to build this site)
Install a specific version of a go binary
go install repo/path@version
e.g.
go install github.com/gohugoio/hugo@v0.145.0
Unzip all zip files in place recursively
find . -type f -name '*.zip' -execdir unzip -o '{}' \;
Remove a trailing newline
head -c -1 file.txt > file.tmp && mv file.tmp file.txt