public marks

PUBLIC MARKS from orieg with tags linux & bash

August 2020

5 Simple Steps On How To Debug A Bash Shell Script

Learn how to quickly debug scripts in Bash with those 5 simple steps that use some of the Bash shell special properties.

July 2020

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.

What Is The Right Way To Loop In Bash?

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.

June 2020

What Is The Best Way To Count Files In A Directory?

Learn how to count the number of files in a directory using the Linux command line ls, find, and a native bash shell solution with globs and arrays.

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.

May 2020

Performing Math Calculation In Bash

Find out how to do math with integer and floating-point arithmetic in Bash. We cover addition, subtraction, division, multiplication, and also floating-point precision.

What 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.

A Complete Guide On How To Use Bash Arrays

Learn how to use bash array variables and associative bash arrays. This guide covers how to declare a bash array, iterate over a bash array, and access keys and values.

How To Format Date And Time In Linux, MacOS, And Bash?

Find out how to manipulate date and time on linux and macOS systems as well as natively in the Bash shell. This post covers all you need to know to format a date from your shell.