
TIL: the `shuf` command
shuf
via an answer to the question: Random number from a range in a Bash Script
Useful for e.g. randomly selecting a port in a cluster:
curl http://127.0.0.1:$(shuf -i 8000-8005 -n1)
All links, in order of mention:
- shuf: https://man7.org/linux/man-pages/man1/shuf.1.html
- an answer to the question: https://stackoverflow.com/a/2556282/391826
- Random number from a range in a Bash Script: https://stackoverflow.com/questions/2556190/random-number-from-a-range-in-a-bash-script
Recent posts:
- Patch for aarch64 (aka arm64) openssl 1.0.2 'relocation R_AARCH64_PREL64 against symbol OPENSSL_armcap_P error'
- TIL: the `NO_COLOR` informal standard to suppress ANSI colour escape codes
- Copy the contents of a branch into an existing git branch without merging
- Adding search to a static Jekyll site using pagefind
- asdf, python and automatically enabling virtual envs