Tuesday, February 13, 2024

for loop in shell script ?

 #!/bin/bash


start=3

end=8


for i in $(seq $start $end); do

    if test ${i} -lt ${end}

    then

           echo "${i} less than ${n} "

     fi

     if test ${i} -eq ${end}

     then

            echo "${i} equal to ${n} "

    fi 

done


No comments:

Post a Comment

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...