Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash while loop

#!/bin/bash
i=0
While [ $i -le 10 ]
do
 echo i:$i
 ((i+=1))
done
Comment

bash while done

while CONDITION_STATEMENT; do SOME_CODE; done
Comment

bash while

#!/bin/bash
counter=$1
factorial=1
while [ $counter -gt 0 ]
do
   factorial=$(( $factorial * $counter ))
   counter=$(( $counter - 1 ))
done
echo "$factorial"
Comment

bash do-while

while : ; do 
    ACTION_CODE
    [[ CONDITION_STATEMENT ]] || break
done
Comment

PREVIOUS NEXT
Code Example
Shell :: close vim 
Shell :: commit with git 
Shell :: github new repo 
Shell :: how to run cmd run administrator using script 
Shell :: how to update git password in windows 
Shell :: kubernetes windows install 
Shell :: redirect stderr to file linux 
Shell :: le wagon setup 
Shell :: create biitable usb installer for macos 
Shell :: git bash command 
Shell :: install sonarqube on ubuntu 
Shell :: instaling ansible on ubuntu linux 
Shell :: github max file size 
Shell :: flutter run 
Shell :: free image upload server 
Shell :: join computer to domain powershell script 
Shell :: How do I use combination of head and tail commands in LINUX in order to print few lines of code 
Shell :: batch disable windows system recovery 
Shell :: open . command 
Shell :: Correct Folder Permissions Ubuntu 18.04 Server 
Shell :: Checking for a new Ubuntu release Failed to connect to https://changelogs.ubuntu.com/meta-release. Check your Internet connection or proxy settings No new release found. 
Shell :: Run multiple commands over SSH as sudo 
Shell :: ag ignore directory 
Shell :: app-crashed 
Shell :: dos assign carriage return to variable 
Shell :: sftp with private key cli 
Shell :: git change autor of all comits 
Shell :: github actions cache apt packages 
Shell :: install webdav ubuntu 18.04 
Shell :: how to look the usb free space in linux command line 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =