for loop in shell script
for i in {1..5}
do
echo "Welcome $i times"
done
for loop in shell script
for i in {1..5}
do
echo "Welcome $i times"
done
shell for loop
# Basic syntax:
for file in /directory/*; do
command
done
# Where:
# - the command is run on each file found using the search pattern (here,
# all files in the /directory/ folder
# Example usage:
# Say you have the directory "/my/favorite/files" with the following files:
test.txt
my.txt
code.png
for file in /my/favorite/files/*.txt; do
echo $file
done
--> test.txt
--> my.txt
# Note, code.png isn't printed because it doesn't match the search pattern
how to use for loop in linux command line
for i in `seq 1 10`; do echo $i; done
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us