Is it best practice to include usage in every Bash script that you create. This gives the user an idea of what options the script is expecting, so they can use it as intended. It also gives the script some error checking ability to make sure that the user has supplied arguments in the expected way.
scripting
Bash script: While loop examples
The while
loop in a Linux Bash script is a type of loop that continues to execute as long as the programmed condition remains true.
Bash Scripting: Operators
Using operators in a Bash script is how you determine whether a condition is true or not. And testing for conditions is how we program a Bash script to be dynamic by giving it the ability to respond differently depending on a scenario.
Bash Scripting: Command line arguments
In some Bash scripts, there is an option to pass arguments to the script when you are executing it. This allows the user to specify more information in the same command used to run the script.
Bash Scripting Cheat Sheet
The ability to automate tasks with Bash scripts in Linux is one of the operating system’s most powerful components.
Bash scripting vs Python
Bash scripting and Python are two different ways to program and automate tasks on a Linux system. Many Linux users choose to learn one or the other, and some even learn both.
Bash scripting vs PowerShell
In this article we will talk about differences between Bash scripting vs PowerShell. Bash is the command interpreter for Linux systems and is well known as a tool that can be used for automation and repetitive tasks via Bash scripts. PowerShell serves the same purpose, but for Windows systems.
Using Python to Parse JSON
The objective of this article is to describe how to parse JSON data in Python.
Bash script: Unary operator expected
A Unary operator expected
error in a Bash script usually occurs in artihmetic operations where the script does not find the amount of numbers (or “unary operators”) it expected to.
Bash script: Quotation explained with examples
Quotation on a Linux system can be a source of confusion at first. Single quotes '
and double quotes "
are treated differently in Bash, and you will need to know the difference if you are writing a Bash script.
Bash script: Unexpected end of file error
An Unexpected end of file
error in a Bash script usually occurs when you there is a mismatched structure somewhere in the script.
Bash Script: Flags usage with arguments examples
If you have any experience on the Linux command line, then you should have run into command flags, which help us modify the behavior of a command that we are executing.