Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

for i in range bash

#Just use command seq to iterate a range from start to end
END=10
for i in $(seq 1 $END); do echo $i; done
Comment

bash for i in range then

#!/bin/bash

for i in {0..100};
do
	echo "hello"
	sleep 5s
done
Comment

bash for i in range

# Brace Expansion
for i in {1..10}; do echo $i; done
Comment

bash iterate over a variable range of numbers

#!/bin/bash
START=1
END=5
for i in $(eval echo "{$START..$END}")
do
	echo "$i"
done
Comment

PREVIOUS NEXT
Code Example
Shell :: wsl windows 
Shell :: install xfce 
Shell :: fedora spotify 
Shell :: clear cache manjaro 
Shell :: show weather top bar in ubuntu 
Shell :: ssh-keygen 
Shell :: error ppa.launchpad.net/certbot/certbot/ubuntu focal Release 
Shell :: how to get the size of directory in linux 
Shell :: show connected wifi password windows 
Shell :: install bower npm 
Shell :: docker snap install 
Shell :: npm install moment 
Shell :: install node 16.15.0 mac cmd 
Shell :: git push command line 
Shell :: perl reverse shell 
Shell :: "enter passphrase for key" 
Shell :: git reset origin branch 
Shell :: see installed packages pacman 
Shell :: brew install eb cli 
Shell :: show date linux 
Shell :: set git credentials so that i never ask for username and password while pushin 
Shell :: install flask on ubuntu 
Shell :: npm install @emotion/core 
Shell :: install dirsearch 
Shell :: git stash drop item by number 
Shell :: cmd kill process 
Shell :: hash sum mismatch ubuntu 
Shell :: composer drupal install 
Shell :: undo git pull 
Shell :: my partition disappeared windows 10 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =