bat # cat with syntax highlighting
zoxide # keeps track of directories
tig # ncurses git viewer
atuin # shell history across machines
choose # easier cut or "awk '{print $1}'"
direnv # set environment vars when you enter a directory
fd # better find
fzf # fuzzy find anything, total game changer
gh # GitHub client
rg # really fast recursive grepSomething that I didn't put in the book because I learned it only recently is the use of "notify-send", aka you can send yourself a system notification from the command line or script (at least it workd for me in Gnome). For instance once a task is finished:
> echo "when finished send notification" && notify-send "system notification"
Pretty cool if you ask me!
also any command | while read line; do something $line; done
and find and vi of course
set -o vi
set -o xtrace
xargs, xargs -I
parameter expansion (see the Parameter Expansion section in the bash manual)
ctrl + r
find -exec
lsofOh, and thus of course
find ... | xargs perl -lne "fancy stuff"
to do some fancy stuff with found files ;-) find ... -exec perl -lne "fancy stuff" {} +
because for one it doesn't mess with stdin, and for another you don't have to worry about filenames with spaces or newlines in them. I also like -execdir since if my script dumps any output to other files I'll probably want that output near the sources. And did I mention it does nothing if there are no matching files? I also think it looks better and is shorter.If you really can't remember that or want to continue to pollute the environment with extra heat generated by running two cpus to do the job one can do, you should at least use -print0/xargs -0 because of spaces, and always use -r to more sensibly handle an empty result-set from find et al (gnu xargs runs once!)