rmdir command is used to remove directories in windows and linux systems but only if they are empty. If the directories are non-empty then you will get the error rmdir…
In this bash script code article you will see how to create a progress bar. This is a fine example to show download progress, loaders, waiting etc. This function accepts…
In this article we will show you a bash script code for creating nameref for accessing a variable from another variable. This is very useful as it creates a dynamic…
To get the content between two substrings, we will provide you a bash script code. You will need to provide a file from which you want to extract the content…
In this article we will look at the bash script code which can count total files or directories inside any directory. This works by passing the output of the glob…
To loop over files and directories, we will provide you bash script code. This code can fetch all files and folder, selected extension only, only files, only folders, and nested…
In this code example we will share a bash function to loop over contents of input file. It contains a while loop which reads the content line by line. Code…
Get bash script code example to loop over a range of numbers. In this code you can provide any valid number to the variable. This loop works like for loops…
In this article you will get the code to loop over a range of numbers in bash script. This code will work for defined range. Variable support is not there.…
Get bash script code to toggle between two values. This code is best suited for situations where you want to toggle the state of a switch from on/off. It can…
In this article we will show you a bash script code to get random element from an array. This function will select an element randomly and return. It doesn’t use…
In this article we will provide you the bash script code to remove duplicate elements from array. In this approach, the order of list items may change. Code Example –…
In this article we will provide you bash script code to reverse an array. In this function you can provide an array or multiple arguments. Code Example – Inspired from…
In this article we will provide you bash script code example to check if substring is present at the start of the string. This code won’t check any other occurrences…
In this article I will provide you the bash script code to check if a substring is present in string or an array. This code works for both strings and…