Cancel

Shebang Line in Bash

#! shebang or shebang line is used to tell the operating system which interpreter to use to parse the rest of the file. Lets create your first hello world script. #!/bin/bash echo "Hello World" ...

Non-Positional/Positional arguments in Bash

Positional arguments are parameters that we can supply to our bash script while executing. # don't forget to set execute permission. cat <<EOF > my_script.sh echo "Hi, \$1 \$2" EOF # fir...

Loops in Bash

Loops are one of the fundamental concepts of programming languages. Loops are handy when you want to run a series of commands over and over again until a certain condition is reached. I am not gon...

Input, Output, and Error Redirection in Bash

Input, Output, and Error redirection is the most important topic to cover in Bash Scripting. Standard Output, aka stdout, whose symbolic value is > or >>. # over write data every time yo...

Input from User in Bash

Read command takes the input from a user and saves it onto a variable, so you can use it later on during your script. Ask a user to press Y or N to execute. read is a command to ask user to gi...

Heredoc in Bash

You can run any program within a shell script without user action by supplying the required input for the interactive program. EOF operator stands for the end of the file. This means that wherever...

Functions in Bash

The function is essentially a set of commands that can be called numerous times. The purpose of a function is to help you to make your bash scripts more readable and to avoid writing the same code ...

Best Places To Visit In Australia

When you set up your trip, you want to select what you would like to envision and wherever you would like to travel. It should be the world’s smallest continent, however, its hierarchal variety is ...

10 best states to live in USA

Here square measure the highest ten best states to measure within the USA wherever you’ll be able to notice the standard of life, safety with a lower ranking in affordability, and folks square meas...

File Importing in bash

You can import a file in bash using the source command. Create few variables in vars file, so you can use these variables later on inside the different files. first_name="Yafiz" last_name="Abraha...