Bash – Page 2 – POFTUT

Linux Bash Case Statement with Examples

Bash provides an interactive shell and programming environment for its users. Programming environment have very reach features like loops for and while, selection if and case. In this tutorial we will examine the case mechanism in detail. Syntax Syntax of case statement is a bit different and complex then if and other conditional expressions. case statement generally uses expression which … Read more

What Is Base64 and How To Encode and Decode Text?

What Is Base64 and How To Encode and Decode Text?

Base64 is an encoding and decoding algorithm. We need the encoding of some data in order to prevent storing and transmission problems. For example, If we try to transfer binary data it may create and affect some network devices because of its data structures. Base64 is generally used different applications like email and MIME, XML, … Read more

How To Bash Concatenate or Add Strings?

Bash provides string operations. We can use different operations like remove, find or concatenate strings in bash. In this tutorial we will look how to add or concatenate strings in Linux bash. Put Variables Side By Side The simplest and easy to understand way to concatenate string is writing the variables side by side. We … Read more

Linux Bash Comments Inline or Outline

Linux bash have a lot of different type of programming features. While using these features we can create very complex scripts or applications in bash. In order to take notes in a script we should use comments. Comments provides useful information for system administrators. Comment Bash In bash comments starts with # . In the … Read more

How To Check If File Exists In Linux Bash?

Linux bash have different file and directory related functions to create, delete, change and check existence. In this tutorial we will look how to check a file or directory if it exists. Check File Existence We will use bash test mechanism. Bash test mechanism have two formats where we can use followings. test -f FILENAME … Read more

How To Set Path In Bash Shell Linux?

How To Set Path In Bash Shell Linux?

Linux bash shell provides a lot of information into running applications. PATH is one of the most important ones which is used to locate binary files and libraries. In some situations, we may need to edit, add or remove some paths and locations from the bash PATH variable. In this tutorial, we will differently use … Read more

How To Pass and Parse Linux Bash Script Arguments and Parameters

Bash is a powerful scripting language provides by various Linux distributions, Unix and BSD. If we need to make our script dynamic we generally use arguments. Arguments are provided to the script through the command line. In this tutorial, we will examine different use cases of argument passing and examples. Syntax In order to use … Read more

How To Linux Bash For Loop In Files?

Bash provides a lot of useful programming functionalities. for loop is one of the most useful of them. We can use for loop for iterative jobs. Linux system administrators generally use for loop to iterate over files and folder. In this tutorial, we will look at how to use for loop to iterate over files … Read more

Linux Bash For Loop Range Examples

Bash for loop is popular programming structure used by a lot of Linux system administrators. For loops can be used in a lot of different cases. We have all ready examined the bash while and for loop in the following tutorial. Bash For and While Loop Examples In this tutorial we will look more specific … Read more

Linux Bash Tutorial Index

Introduction To Linux Bash Programming Linux Bash Directories and Files Linux Bash Environment Variables Linux Bash Variables Linux Bash Functions Linux Bash If Else Conditionals Linux Bash Create and Run Script Files Linux Bash Operators Linux Bash Arrays Linux Bash Input, Output and Redirection Linux Bash History Linux Bash Alias Linux Bash .bashrc File Linux … Read more