Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

for loop in shell script

for i in {1..5}
do
   echo "Welcome $i times"
done
Comment

for loop iteration in shell script

#!/bin/bash
START=1
END=5
echo "Countdown"
 
for (( c=$START; c<=$END; c++ ))
do
	echo -n "$c "
	sleep 1
done
 
echo
echo "Boom!"
Comment

For loop in shell script

for i in `seq 1 10`
do
	echo $i #Do something here.
done
Comment

PREVIOUS NEXT
Code Example
Shell :: git push template 
Shell :: kubectl exec run command inside pod 
Shell :: git save password 
Shell :: kill port cli 
Shell :: git command line discard changes 
Shell :: install python mysqlclient on mac 
Shell :: ubuntu list of users 
Shell :: how to install xfce 
Shell :: ubuntu edit sources.list 
Shell :: no matching manifest for linux/arm64/v8 in the manifest list entries 
Shell :: close tcp port on mac 
Shell :: how to set gcc-8 as default in linux 
Shell :: push an existing repository from the command line 
Shell :: difference between two files linux 
Shell :: iis restart cfrom command promt windows 
Shell :: squash commit history git 
Shell :: fatal: invalid gitfile format 
Shell :: install steghide ubuntu 
Shell :: find linux 
Shell :: git config credential.username 
Shell :: install postman 
Shell :: download ubuntu 16.04 iso 64-bit 
Shell :: kill k3s 
Shell :: linux chmod 
Shell :: firebase install 
Shell :: convert ppk to pem 
Shell :: change remote origin git 
Shell :: install trading view on linux 
Shell :: linux 
Shell :: undercover mode kali 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =