Headlines
Loading...
Program in UNIX to display processes in the system every 30 seconds five times using a while loop

Program in UNIX to display processes in the system every 30 seconds five times using a while loop

 Write a script to display the processes in the system every 30 seconds five times using a while loop


echo "PROCESSES IN SYSTEM"

cnt=5


while [ $cnt -ne 0 ]

do

    ps

    echo "=========================="

    sleep 30

    cnt=`expr $cnt - 1`

done

*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***