Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

two variable in for loop bash

note the commma and semi collens here

for ((i=0,j=10;i<=j;i++,j--))
do
   echo "i=$i"
   echo "j=$j"
done

i=0
j=10
i=1
j=9
i=2
j=8
i=3
j=7
i=4
j=6
i=5
j=5

# something complex

somethong omp
$id1=120
$id2=170
##
for (( a=$id1, b=$id2;  a < 59  + $id1 && b < 61 + $id2; a=$((a+10)), b=$((b+10)) ));
do
        echo "d1 = $a d2 = $b "
done
####
Comment

PREVIOUS NEXT
Code Example
Shell :: git how to rollback to previous commit 
Shell :: git delete last commit in remote 
Shell :: salir de vim 
Shell :: git copy file from another branch 
Shell :: cordova-plugin-camera android crash 
Shell :: git copy folder from another branch 
Shell :: get from match to end of file 
Shell :: create a new branch from existing branch in git 
Shell :: remove branch local git 
Shell :: gatsby typescript template 
Shell :: git create branch from commit 
Shell :: how to open folder in files from terminal linux 
Shell :: powershell create folder recursively 
Shell :: digitalocean connect via ssh 
Shell :: check mtu size linux 
Shell :: git create github repo 
Shell :: autostart service linux 
Shell :: restart terminal without closing 
Shell :: run MongoDB manually as a background process macos 
Shell :: git modify last commit message 
Shell :: terminate gitpod ports 
Shell :: powershell unzip multiple files 
Shell :: zip directory in linux 
Shell :: git check differences between two projects 
Shell :: how to merge git 
Shell :: pip install webview error 
Shell :: how to reduce the size of an image in linux 
Shell :: install docker-compose 
Shell :: how to install zsh using brew 
Shell :: npm i postgresql 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =