[Shell Script]How to execute multiple shell commands using a single shell variable ?


To execute multiple shell commands using a single shell variable, Assign the multiple shell commands to a variable. execute the shell variable using echo  eg: Find a.txt in the present directory  Let the multiple commands are ls and grep  Let the shell variable is cmd . cmd=$(ls | grep a.txt ) To execute the commandsContinue reading “[Shell Script]How to execute multiple shell commands using a single shell variable ?”

[Shell Script][Perl Script]Monitoring a process’s status in a particular time interval


Assuming process.sh is the process which is to be monitored periodically. For checking above process’s health , a script is required . Here statuscheck.sh will check whether the process.sh is running or not. If process is not  running, restart the process using exec command   monitor.sh will call statuscheck.sh in every particular interval(eg: here in everyContinue reading “[Shell Script][Perl Script]Monitoring a process’s status in a particular time interval”