Topics

Bash

About this topic: Articles tagged __TAG__

Showing 219 articles

Topics

Articles

Showing 219 articles

How-tos Bash Double Pipe This article will explain the purposes of single and double pipe symbols in Bash. How-tos How to Get Current Date and Time in Bash This is a trivial guide to getting the current date and time using Bash. How-tos Floating Point Arithmetic in Bash This is a brief programming tutorial on how to perform floating point arithmetic in Bash. How-tos How to Execute Commands in a Variable in Bash Script This is a programming tutorial about executing a command stored in a variable in a Bash Script. How-tos How to Copy All Files From a Remote Directory A quick demonstration of copying all the files from a remote directory. How-tos How to Sort Array in Bash This tutorial will discuss sorting array in Bash. How-tos How to Append Text to a File Using Bash We can append text to a file using the Redirection (>>) operator, and the tee command. How-tos How to Compare Strings in Bash We compare the strings using comparison operators and check whether the string contains substring or not using regular expressions. How-tos How to Use if...else Statement in Bash We can use if...else statement in Bash to run the statements if particular condition is satisfied or not. How-tos How to Use Functions in Bash The same code that is to be used repeatedly is written as function definition and the portion where we need the code to be used, we simply call the function. How-tos How to Use while Loop in Bash while loop is one of the most widely used loop structures in almost every programming language. We can specify a condition for the while loop and the statements in the loop are … How-tos How to Use getopts in Bash Script This shows the usage of getopts in bash scripts by parsing options with arguments and parsing options without arguments. How-tos How to Create Multi-Line String in Bash This tutorial demonstrates different ways to print multi-line string to a file in bash without extra space by the use of here-document, shell variable, printf, echo and echo with … How-tos How to Extract Substring in Bash This tutorial demonstrates different ways to extract a substring in bash using the cut command, substring expansion and Internal Field Separator. How-tos How to Split String Into Array in Bash This tutorial explains splitting a string into an array in bash by using the read command, the tr command and using parameter expansion. How-tos How to Split String in Bash This tutorial demonstrates splitting a string on a delimeter in bash by using the tr command, the IFS, the read command, using parameter expansion, and using the cut command. How-tos How to Get File Name and Extension Using Bash A simple bash script that gets file name and its extension separately. How-tos How to Get Script Directory in Bash This tutorial demonstrates getting the directory that a script is located in by using the $0 and dirname, BASH_SOURCE array, readlink command, and realpath command. How-tos How to Make a Bash Alias This tutorial demonstrates the creation and deletion of alias in Bash. How-tos How to Convert Letter Case of Strings in Bash This tutorial demonstrates the conversion of letter case of strings in Bash. How-tos How to Pause Bash Shell Script for X Seconds Learn how to utilize read and sleep commands in Bash to pause a script How-tos How to Trim Whitespace in Bash This tutorial shows trimming white spaces in bash using the xargs command, the sed command and the awk command. How-tos How to Set Variable to Output of Command in Bash This tutorial demonstrates assigning the output of a command to a variable in bash using command substitution. How-tos How to Add Numbers in Bash This tutorial shows different ways of adding numbers in a bash script using expr, arithmetic expansion, bc and awk.

← All topics