
Tips on Unix utilities and related topics from @JohnDCook.
Joined August 2011
- Tweets6.4K
- Following19
- Followers82.8K
- Likes98
Pinned Tweet
'The enjoyment of one's tools is an essential ingredient of successful work.' -- Donald E. Knuth
Avoiding multiprocessing errors in bash shell johndcook.com/blog/2024/02/1…
Shell scripts run in their own subshell, so a cd in a script only effects the subshell. To script a cd, use an alias instead.
Two bash shortcuts to cd into /long/path/name
cp file.txt /long/path/name
cd !$
cp file.txt /long/path/name/foo.txt
cd !$:h
The :h modifier is for "head", i.e. strip off the last part of the path.
UNIX Style, or cat -v Considered Harmful harmful.cat-v.org/cat-v/
Summarizing Emacs cursor movement commands johndcook.com/blog/emacs_mov…
Better bash scripting in 15 minutes robertmuth.blogspot.com/2012…
Opening large files in Emacs emacsredux.com/blog/2014/05/… by @bbatsov
Sort and remove duplicates in large files johndcook.com/blog/2023/08/0…
'Gow (Gnu On Windows) is the lightweight alternative to Cygwin,' github.com/bmatzelle/gow
Create a directory and change into it: mkdir dir && cd $_