| by Arround The Web

Calculate the Sum of a Column Using the “Awk” Script in Bash

Comprehensive tutorial on the multiple ways of calculating the sum of a column from a file using the “awk” script in Bash through different examples

Share Button
Read More
| by Arround The Web

Use of Not Equal to the Operator in Bash

Practical tutorial on method of comparing two values using the “!=” and “-ne” operators to check the equality or inequality of two strings or numbers.

Share Button
Read More
| by Arround The Web

How to Find the Array Length in Bash

Tutorial on the methods of counting the length of an array in Bash using the “#” symbol or loop, or using the “wc” or “grep” commands along with examples.

Share Button
Read More
| by Arround The Web

How to Use the Recursive Grep Command to Search in the Directory

Practical guide on how to use the recursive “grep” command to search the content in a directory of multiple files using different types of options and patterns.

Share Button
Read More
| by Arround The Web

Check the Number of Arguments in the Bash Script

Checking the uses of the number of arguments in Bash script for various purposes such as error handling, providing messages based on the number of arguments.

Share Button
Read More
| by Arround The Web

Check If the File Exists in Bash

The method of checking if a regular file exists in Bash or not in the current or particular location using the file test operators with the “test” command.

Share Button
Read More
| by Arround The Web

Bc Command in Bash Scripts

Tutorial on the various uses of the “bc” command in Bash scripts to generate the fractional value of any mathematical calculation with the precision value.

Share Button
Read More
| by Arround The Web

.Bash_Profile File in Bash

Tutorial on the “.bash_profile” file in Bash to set the environment variable or define any script to perform the automated tasks at the startup of the system.

Share Button
Read More
| by Arround The Web

Bash Sleep Command

How to use the Bash sleep command to stop the execution of the script for a certain period or do any scheduled task before executing a particular script.

Share Button
Read More
| by Arround The Web

How To Check Existence of Input Argument in a Bash Shell Script

We can use different techniques to check the existence of input arguments, such as using the “test” command, the “$#” variable, or the “-n” option.

Share Button
Read More
| by Arround The Web

How to Fix – bash: pip: command not found

The “pip: command not found” error can be easily corrected by checking if pip is installed, installing it if necessary, and setting the path to pip in the Bash.

Share Button
Read More
| by Arround The Web

How to Add a New Element to an Array Without Specifying the Index in Bash

To add a New Element to an Array Without Specifying the Index in Bash, use the += operator with the name of the array. Read this guide for more details.

Share Button
Read More
| by Arround The Web

How To Echo Shell Commands as They Are Executed in Bash

Echoing shell commands as they are executed can be done by using the set command, the -x option and the DEBUG trap. Read this guide for more details.

Share Button
Read More
| by Arround The Web

What Does -z Mean in Bash

The -z option in Bash is a powerful tool for testing whether a string is empty. Read this guide for more details.

Share Button
Read More
| by Arround The Web

Is There a “goto” Statement in Bash

In Bash, there is no “goto” statement, instead, Bash provides alternative constructs that can achieve the same effect as a “goto”.

Share Button
Read More
| by Arround The Web

How to Block Comments in a Shell Script-Bash

Block comments can span multiple lines of code. In shell scripting, we can create block comments by enclosing the comments within the <<‘EOF’ and ‘EOF’ markers.

Share Button
Read More
| by Arround The Web

How Do I Execute a Bash Script in Terminal

To run a bash script in terminal there are four ways: through its path, through source, through sh command and through bash interpreter.

Share Button
Read More
| by Arround The Web

Echo without Newline Character in Bash

To use echo without newline character in bash there are three ways: using -n option, using -e option with escape sequence and using tr command.

Share Button
Read More
| by Arround The Web

Bash exit 1 and exit 0 – What’s the Difference?

The exit(1) means that the command was not executed successfully whereas exit (0) shows that command executed successfully.

Share Button
Read More
| by Arround The Web

How to Assign Output of a Linux Command to a Variable – bash

To assign output of a Linux command to a variable in bash there are two ways one is through backticks and other is through command substitution.

Share Button
Read More