Let's make a list of our favorite CLI utilities.
Let's make a list of our favorite CLI utilities.
Any extra tips or tricks are welcome!
Yesterday I learned that set -x
enables trace for a bash, sh, or zsh script and prints the trace to the terminal.
Newsboat, an RSS reader https://newsboat.org/
6 0 ReplyInteresting :)
1 0 Reply
In Bash, I like to use cdargs
sudo apt-get install cdargs
It allows you to set up shortcuts on the fly,
cv sdbackup
rather than cd /media/user/Backup Plus/ MyFiles/current/sdbackup
cv with no argument will give you a list to select from current shortcuts
3 0 ReplyOf those mentioned, this one intrigues me most. Thanks!
1 0 Reply
I really like jless. You can pipe the JSON output of a cURL command into it and it displays it in a really nice, easy to read way with collapsible arrays and objects.
3 0 ReplyWhy haven't I heard of this before?? Absolute gamechanger o_O
1 0 Reply
pv, which is like cat, simply copying files or stdin to stdout, but prints statistics to the terminal.
A related tip:
dd
isn't special in the way most people use it. This works too, if you're root:pv my-fav-distro.iso > /dev/sdc
2 0 ReplyI'm a pretty big fan of
icdiff
. This utility allows you to compare two files to see what has been added or removed by using colorful fonts to highlight values.2 0 ReplyI recently learned about diffsitter which uses tree-sitter for meaningful diffs
0 0 Reply
I write a lot of bash scripts that end up running in automation in some fashion.
#!/usr/bin/env bash set -euxo pipefail
Is pretty standard for me.
-e
exit on error-o pipefail
exit on pipeline fail-u
error on unset variables-x
trace2 0 ReplyTaskwarrior.
2 0 ReplyMy answers (mostly running in powershell - not that it makes much of a difference!)
Rust-based utilities I couldn't live without:
fd
(fd-find) for finding my filesrg
(ripgrep) for string searchessd
(sed) for search and replacedust
(dust) for information about my directorieslsd
(aliased tols
orl
) for replacingDir
bat
(better cat) - for when the help pages are too long
Other stuff I love:
1 0 ReplyAlways partial to yq and jq. No easier way to interact with kubernetes outputs on the fly.
1 0 ReplyDon't forget about fq!
2 0 ReplyI don't know about k8s work in particular, but I enjoy jello and yamlpath more than jq and yq.
2 0 ReplyHow I have never heard of yq, I'm unsure, but thank you as I'm sure it will make life easier
1 0 Reply