Author Archives: Roopendra - Page 7
How to read a config file in Python
How to read a config file in Python: This article will help you to read config based on the environment. For example, If you have a python script which uses different database config for UAT and PROD. host = "" port = "12345" user = "PROD_SCHEMA" password = "Pwd1" service…
How to run multiple bash scripts in parallel
If you working as a Linux administrator or as a DevOps engineer then you might get a use case where you need to run multiple bash scripts in parallel without waiting to finish execution of previous script. Let me show you possible ways to achieve this in bash script For…
Get the last ten business days in a Unix shell script
Shell script to get the last 10 weekdays and run some task for each date over an element array. #!/usr/bin/bash n=10 today=$(date +'%Y-%m-%d') for ((d=1; n>0; d++)) do # Adjust this next line to get the date format you require, +'%Y%m%d' date=$(date --date "$today -$d day") nday=$(date --date "$today -$d…
What is Site Reliability Engineer (SRE) Role?
What is Site Reliability Engineer (SRE) Role? Site Reliability Engineering (SRE) is a discipline that incorporates aspects of software engineering and applies them to infrastructure and operations problems. The main goals are to create reliable, efficient, and scalable software systems. According to Ben Treynor, founder of Google's Site Reliability Team,…
Regular Expression Reference
Regular Expression Reference 1) Write a regular expression to match pattern in email. match -eu before @ in email. Regex : 2) Meta Character Reference
Shell script to pass multiple arguments with options
Shell script to pass multiple arguments with options This tutorial will help you to pass multiple arguments in a more organized manner. I have used two arguments "t" and "d" here. The first argument "t" will accept task value and based on the task value you can perform the respective…
How to install Maven on Windows 10
How to install Maven on Windows 10 In order to install maven on a Windows machine you will need to install JDK first as Maven is a Java based tool. If you are installing Maven then you required JDK version or above. If JDK is already installed on your Windows…
How to Run a Shell Script in Infinite Loop
You can run a shell script in infinite loop by using while loop. #!/bin/bash while true do echo "Press CTRL+C to stop the script execution" # Enter your desired command in this block. done You can also do this using below inline command while true; do echo 'Press CTRL+C to stop…
Cut and paste in Vim editor
Here is the simple step by step guideline to cut and paste in Vim editor. Press esc if vim editor in insert mode Position the cursor where you want to start cutting. Press v to select the characters and move the cursor at end of character you want to cut.…
How to Run a Linux Script During Reboot or Startup
How to Run a Linux Script During Reboot or Startup I come across one use case where I need to run a Linux script during reboot or startup of the system. To handle this use-case I have created new script in / Lets consider the below example script. / #! /bin/sh…

