Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Bash Shell Online

#!/bin/bash
# Automated Date Recorder
#MVL Lab Shell Script 01

yyyy=2019	
mm=1
dd=1
hh=00

while [ $yyyy -lt 2020 ];
	do	
    	while [ $mm -lt 13 ];
        	do
            	while [ $dd -lt 31 ] ; 
                do
                
                    	while [ $hh -lt 24 ];
                        	do
                            	echo "Current Status: $yyyy/ $mm/ $dd : $hh"
                                hh=$(($hh + 06))
                            done
                       hh=00
                       dd=$(($dd + 1))
                done
                	dd=01
                	mm=$(($mm+1))
            done
         		mm=01   
         		yyyy=$(($yyyy+1))
     done

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.