Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash while true

while :; do
  # loop infinitely
done
Comment

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

PREVIOUS NEXT
Code Example
Shell :: bash loop over files in file 
Shell :: snapd remove command 
Shell :: update dart 
Shell :: how to push code to github from vscode 
Shell :: git clone branch from repo 
Shell :: git set alias 
Shell :: bash script template 
Shell :: please rebuild precompiled header 
Shell :: change size apache 
Shell :: Retrieve Linux command line history by date 
Shell :: install specific version of r package 
Shell :: install haskell stack 
Shell :: git force push 
Shell :: powershell remove files recursive 
Shell :: bash how to download password protected files 
Shell :: sudo apt-get install podman 
Shell :: git clone with submodules 
Shell :: adonis js make seeder 
Shell :: Printing 1-100 in Bash (3 ways) 
Shell :: install pip 
Shell :: ubuntu install nodejs 
Shell :: how to install gitkraken on fedora 
Shell :: Server: ERROR: Got permission denied while trying to connect to the Docker daemon socket 
Shell :: "C:UsersMY PCAppDataRoaming pm/node_modules/node/bin/node: line 1: This: command not found" 
Shell :: brew sdkman 
Shell :: install spotify ubuntu 
Shell :: could not connect to server: Connection refused Is the server running on host and accepting TCP/IP connections on port 5432? 
Shell :: react native run android shows deprecated items 
Shell :: laptop slow performance linux 
Shell :: npm ignore scripts 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =