Bash Tips
A collection of 40 posts

How to Evaluate Strings as Numbers in Bash
Learn how to evaluate bash strings as integers to perform successful arithmetic operations.
· Avimanyu Bandyopadhyay

5 Simple Bash History Tricks Every Linux User Should Know
Effectively using bash history will save you plenty of time in the Linux terminal.
· Abhishek Prakash

Using Case Statements in Bash
Instead of a bunch of nested if else statements, using case statements can drastically reduce the number of lines in your bash script, making it easier to understand and follow the logic.
· Hunter Wittenborn

What is Subshell in Linux?
You might have heard that a shell script runs in its own shell. Learn more on the concept of subshell in Linux.
· Abhishek Prakash

Using Bash printf Command for Printing Formatted Outputs
You may print simple outputs with echo command but that's not enough for complicated formatted outputs.
· Abhishek Prakash

Process Substitution: An Uncommon but Advanced Way for Input/Output Redirection in Linux
Multiple commands and input/output redirections can be effectively used with bash process substitution.
· Abhishek Prakash

Writing Comments in Bash Scripts: Single Line, Inline and Multi-line Comments
Wondering about comments in bash script? Here's how to add single, inline or multiline comments in Bash scripts.
· Abhishek Prakash

How to Check if File or Directory Exists in Bash Shell
Here are several ways you can check if file or directory exists in bash shell script. You'll also learn to check if file doesn't exist.
· Abhishek Prakash

How to Split String in Bash Script
In this quick tip, you'll learn to split a string into an array in Bash script.
· Abhishek Prakash

How to Compare Strings in Bash Shell Scripting
In this tutorial you'll learn how to compare strings in bash shell scripts.You'll also learn to check if a string is empty or null.
· Abhishek Prakash