Editing files in-place with sed will probably give you an error in macOS if you use the syntax you’re used to in Linux bash.
Category: Tech
ufw (Uncomplicated FireWall) commands are complicated, but there is a cheat sheet here
Oneliners for different encodings without leaving the shell:
How to run Magic SysRq on a Lenovo ThinkPad that does not have the SysRq key
Restoring an old post from an old blog about using traps and signals in bash.