Redirecting a stdout to a file using sudo and tee
Learn how to address a permission denied error when trying to edit a file on Linux and work around some sudo issues. This post include a simple vim tips to save changes to a file with sudo right from...
View ArticleDisown a running shell process and reattach it to a new screen
This post cover the basics of shell jobs management and terminal screen sessions. It covers how to detach a running job from your current shell and how to attached it to a new TTY session.
View ArticleHow 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.
View ArticleWhat's New in GNU Bash 5?
Bash version 5 is generally available and comes with some important improvements and new features like BASH_ARGV0, EPOCHSECONDS, and EPOCHREALTIME.
View ArticleHow 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.
View ArticleHow 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.
View ArticleA 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.
View ArticleBash Error: Must Use Subscript When Assigning Associative Array
How to solve the Bash Error "must use subscript when assigning associative array". This post covers why it is occurring and how to fix the error when using Bash arrays.
View ArticleHow 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.
View ArticleRunning Bash script with Ubuntu on Windows 10 using WSL
No-hassle! Learn how to run Bash on Windows by installing your favorite Linux distribution natively on Windows 10 using Windows Subsystem for Linux, aka WSL.
View ArticleHow and When to Use the Dot Command in Bash?
Learn the difference between the dot command (.) and a dot file notation. This post cover how and when you should leverage the dot command to execute a Bash script.
View ArticleWhat's New in Focal Fossa Ubuntu 20.04 LTS?
Ubuntu 20.04 LTS is available for download. Find out some of the major security and performance improvements from this new distribution, including the introduction of WireGuard VPN, upgraded suite of...
View ArticleHow 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.
View ArticleHow 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...
View ArticleHow 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.
View ArticleWhat is the Bash Null Command?
Learn about the Bash null command, also known as the POSIX shell colon command. This post cover concrete use cases and pitfalls to avoid.
View Articlesudo: no tty present and no askpass program specified
Learn what is askpass and how to solve the 'sudo: no tty present and no askpass program specified' error when using sudo to execute a command.
View ArticleWhat are the Differences Between Vi and Vim?
Vi vs Vim: A review of the main differences between the Vi/Ex POSIX standard and the Vim implementation.
View ArticleHow 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.
View Article5 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.
View Article