3 shell scripts to improve your writing, or “My Ph.D. advisor rewrote himself in bash.”
The hardest part of advising Ph.D. students is teaching them how to write. Fortunately, I’ve seen patterns emerge over the past couple years.
—
https://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/
Asides
Read XKCD in the terminal with s
Read XKCD in the terminal with some bash magic
XKCD is probably the most popular webcomic with Devs. It only seems right that you can read it from the comfort of your terminal via a xkcd command. How can we pull that off? I use Kitty as my terminal of choice. It is fast, feature-rich, and is cross-platform (Linux and macOS).
—
https://www.roboleary.net/2022/02/24/xkcd-in-the-terminal-with-some-bash-magic.html
Argc
Argc
We can easily access the corresponding option or parameter through the variable $argc_
—
https://github.com/sigoden/argc
What’s so special about PS1? Fun
What’s so special about PS1? Fun with customizing Bash command prompts
Long ago, when I was still a console newbie, I copied my friend’s bash configuration file. It had all the necessary stuff already included – aliases, colors, and most importantly: a nice prompt setup. I used it on all machines I had access to due to all the extra context it provided.
—
https://blog.warp.dev/whats-so-special-about-ps1/
TomWright/dasel
TomWright/dasel
Dasel (short for data-selector) allows you to query and modify data structures using selector strings. Comparable to jq / yq, but supports JSON, YAML, TOML, XML and CSV with zero runtime dependencies.
—
https://github.com/TomWright/dasel
utt
utt
utt utt is the universal text transformer. utt is intended for converting between textual data representations. For example, utt can be used to convert from JSON to YAML: $ echo “[1, 2, 3]” | utt -i json -o yaml — – 1 – 2 – 3 $ Formats may be supported for input-only or output-only.
—
https://github.com/queer/utt
bash_loading_animations
bash_loading_animations
Ready-to-use loading animations in ASCII and UTF-8 for Bash scripts. Some of the animations have been adapted from https://github.com/sindresorhus/cli-spinners.
—
https://github.com/Silejonu/bash_loading_animations
5 Modern Bash Scripting Techniqu
5 Modern Bash Scripting Techniques That Only A Few Programmers Know
Programmers often create shell scripts with the Bash command language to automate manual tasks. For example, they create Bash scripts for various configurations, file manipulations, generating build artifacts, and various DevOps-related activities.
—
https://levelup.gitconnected.com/5-modern-bash-scripting-techniques-that-only-a-few-programmers-know-4abb58ddadad
Creating a bash completion scrip
Creating a bash completion script
In this post I will familiarize you with the process of adding bash completion to your scripts. Bash completion is a functionality through which bash helps users type their commands faster and easier.
—
https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial
dust – A more intuitive version
dust – A more intuitive version of du in rust
i just discovered dust on a whim yesterday while randomly looking at the recent updates to arch packages and was pretty impressed with it, so i wanted to share here.screenshot of dust in action — https://i.imgur.com/n5v3oKI.pnghttps://github.com/bootandy/dusthttps://archlinux.
—
https://www.reddit.com/r/commandline/comments/t32bi4/dust_a_more_intuitive_version_of_du_in_rust/?utm_source=share&utm_medium=ios_app&utm_name=iossmf