Tag archives for linux
Top 10 DevOps Interview Questions
Top 10 DevOps Interview Questions I have listed down top 10 DevOps interview questions on few topics like, Git, Maven, Jenkins, Docker, Kubernetes, Ansible. What is the need for DevOps?…
How to concatenate string variables in Bash
Here are few preferred ways to concatenate string variables in bash script Concatenate string variables in Bash the variable one after another in echo #!/bin/bash var1="Techieroop" var2="${var1} Tutorial" echo "${var2}"…
How to check if a string contains a substring in Bash
Here are the couple of methods to check if a string contains a substring in bash shell script. Methods to check if string contains a substring in Bash Method 1:…
How to check if file does not exist in Bash?
Check if file does not exist in Bash Script? You can use -f option in bash script to check if file does not exist. Check if file does not exists…
How to check if a directory exists in a bash script?
How to check if a directory exists in a bash script? In shell script implementation you might come across use case where you need to perform some operation in a…
Shell Script Questions and Answers
Please find below list of Shell Script Questions and Answers. Shell Script Questions and Answers 1. Given two integers, X and Y , find their sum, difference, product, and quotient. Constraints X…
Install Elasticsearch on Centos 7
Steps to Install Elasticsearch on centos 7 Prerequisites: Install OpenJDK 8 version sudo yum install Validate the installation java -version If you are installing jdk manually from tar file then…
Check if array contains value in shell script
Check if array contains value in shell script Here is simple bash script to check if array contains value . We can iterate over array and check if value is…
How to get process ID of background process?
I usually prefer to execute process in background so that we don't need to worry if terminal got killed due to timeout or accidently. However, what if you want to…
Loop through business day and previous business day in shell
Shell script loop to execute some task for business day and previous business day. If previous business day is weekend then script should skip the weekend date and pick Friday…