Shell Scripting – set -euo pipefail Failsafe
Shell scripts don’t actually fail automatically. If one line returns a non-zero (failure) exit code, that code simply falls through to the next line, but the shell script keeps running.…
Achieving Developer Excellence with Automated Testing
Shell scripts don’t actually fail automatically. If one line returns a non-zero (failure) exit code, that code simply falls through to the next line, but the shell script keeps running.…
Show the current git branch on the shell prompt For Bash, add this to your ~/.bash_rc file For ZShell, add this to ~/.zshrc
4) Git autocomplete on the shell prompt Go here, right-click and choose “Save As…”, save this file to your home directory as ~/.git-completion.bash(Remember, that ~ means your home directory.) Then…
Ruby RVM, rbenv, or Asdf 1) Choose between Ruby Version Manager or RBENV You’ll want to install either of two tools: Ruby Version Manager, known as RVM, or its alternative…
curl is the fasted command-line tool to see how a URI (uniform resource identifier) responds. You can send any kind of web request (GET, PATCH, POST, PUT). To send a…
On your Bash or ZShell prompt while you navigate the file system, hit tab once. It will “type for you” — automatically matching what it thinks you want— until it…
fg stands for foreground If you hit the Ctl-Z key (see #7), your process went into “the background.” What does that mean, exactly? It means your process is still running,…
Ctl-C — Stop a unix process Although the Background keystroke (#7) tells you “Stopped,” it is, in fact, Ctl-C that is the correct way to exit (also known as “stop” or “terminate”)…
7) Ctl-Z — Background a unix process Ctl-Z (or Control-Z on your keyboard) is “background” which means “send the process to the background.” It frees up your shell prompt for…