Advanced Shell Scripting Techniques: Automating Complex Tasks with Bash Use Built-in Commands Built-in commands execute faster because they don’t require loading an external process. Minimize Subshells …
SHELL
All posts
Makefiles for Web Projects: Manage Your Environment Workflow How I stopped worrying and loved Makefiles Note: Makefile indentation must use tabs, otherwise you’ll get syntax errors. The Core of a Makefile: …
Test Whether a Server Is Vulnerable to Shellshock Bug The Shellshock Bug env x=' () {:;};' Exploiting Shellshock Bug A substituted command is executed since the feature ignores the command specified by the …
How to Delete Files With Names That Contain Non-printable Characters ls -l total 13 -rw-r--r-- 1 ZZ 197121 4 Nov 6 07:08 ' ' -rw-r--r-- 1 ZZ 197121 162 Apr 16 2022 '~$iscord.docx' -rw-r--r-- 1 ZZ 197121 6 Nov …
/etc/shadow and Creating yescrypt, MD5, SHA-256, and SHA-512 Password Hashes chage and Password Aging chage --list root Last password change : Oct 01, 2022 Password expires : never Password inactive : never …
How to Use which on an Aliased Command type type grep grep is an alias for grep --color=auto # Bash's type type -P grep /usr/bin/grep # Zsh's type type -p grep grep is /usr/bin/grep GNU which which -a which …
Shell Script Best Practices Things Just make the first line be #!/usr/bin/env bash. Use the .sh (or .bash) extension for your file. Use set -o errexit at the start of your script. Prefer to use set -o nounset. …
The Art of Command Line
Printing ASCII Art in the Shell banner sudo apt install sysvbanner $ banner hello # # ###### # # #### # # # # # # # ###### ##### # # # # # # # # # # # # # # # # # # # # ###### ###### ###### #### FIGlet: Frank, …
How to Make Output Overwrite the Same Line in a Terminal Introduction to the Problem $ cat print_status.sh !/bin/bash echo "[INFO] Processing file: readme.txt" sleep 2 To simulate the file processing echo …
Zsh tab-completion not working Question Although I’ve used Oh-My-Zsh in the past, I decided this time around (i.e. setting up a new computer) I’d try to avoid installing it to keep things a bit leaner. Right …
Best Practices for Writing Bash Scripts Shell Scripting - Best Practices #!/usr/bin/env bash # Bash3 Boilerplate. Copyright (c) 2014, kvz.io set -o errexit set -o pipefail set -o nounset # set -o xtrace # Set …