How To Calculate IP Subnets and Netmasks in Linux and macOS?
How to convert between CIDR prefixes and netmasks, and calculate network, broadcast, and usable host ranges with ipcalc, sipcalc, python3, and Bash.
How To Make A Custom Bash Shell Prompt
Learn how to customize your shell prompt and the specificity of the Bash Prompt variables PROMPT_COMMAND, PROMPT_DIRTRIM, PS0, PS1, PS2, PS3, and PS4.
The Complete How To Guide of Bash Functions
Learn how to write shell scripts with bash functions. This guide includes examples and best practices on how to define, call, and debug functions in bash.
How To Create Simple Menu with the Shell Select Loop?
The select loop is not a regular shell loop. It can be used in Bash to generate a simple menu from which a user can select numbered options.
What is the Right Way to do Bash Loops?
Looping over a list of numbers or words is a building block in shell scripts. Learn how to write Bash loops, including for loop, while loop, and until loop.
5 Mistakes To Avoid For Writing High-Quality Bash Comments
Adding comments in your Bash scripts is necessary to ensure maintainability over time. This post covers 5 Bash comments mistakes to avoid in your shell scripts.
How To Script Error Free Bash If Statement?
Learn how to script a Bash If statement with the then, else, and else if / elif clauses. Includes Bash conditional expressions and common pitfalls to avoid.
How To Format Date and Time in Linux, macOS, and Bash?
This guide covers how to format date and time in Linux, Mac, and the Bash shell. Includes how to do date shell operations like adding days or comparing dates.
How To Use Option as Meta Key in macOS Terminal?
The Meta Key is a modifier key that can be quite helpful to improve your productivity while working in a terminal and bash. This post cover how to enable from the command line the Meta Key in macOS Terminal.
How To Change Preferences from the Command Line on macOS?
Introduction to the command line 'defaults' on Mac with examples on how to programmatically change user preferences from a shell script and terminal.
How to Parse a CSV File in Bash?
Learn how to parse a CSV file in Bash and avoid the common pitfalls. Includes examples using bash builtins and the awk command line.
A Complete Guide on How To Use Bash Arrays
This guide covers how to use the bash array variables as indexed or associative bash arrays. Includes how to declare, iterate over, sort, and other array operations.
How To Upgrade your Bash Version on Mac OS?
MacOS comes with an outdated version Bash which can be limiting in shell scripts. This post explain how to upgrade your Bash version on Mac from the command line.
How to Find which macOS version you are running?
Find out which macOS version you are currently running with the use of two command line tools named respectively system_profiler and sw_vers.
How To Do Advanced Math Calculation Using bc?
Learn how to use the GNU Linux bc command line to do math arithmetic and algebra with square root, sine, cosine, tangent, arctangent, bessel, and more.
How to flush your DNS Cache on Mac OS X?
Learn how to resolve a bad DNS entry returned by your Mac local cache due to a long TTL DNS and how to purge your Mac OS DNS cache for your specific Mac OS version, all this right from the command line.
How to Reload or Change your current Shell?
Learn the basic steps to reload your Linux shell to apply your recent configurations changes. This post cover the POSIX exec builtin command in Bash and the GNOME shell.
How to manage an idle ssh connection ?
Quick and simple tips on how to handle an idle remote ssh connection from your terminal.
