Answers for "bash for loop multiple statements"

1

bash for loop multiple statements

# Basic syntax:
for i in a b; do echo $i; printf "$it$in"; done
# Where:
#	- each command in the for loop needs to be separated by semicolons. Here
#		we echo $i and then print $i<tab>$i<newline>
#	- over several lines this would be equivalent to:
for i in a b
do
  echo $i
  printf "$it$in"
done
Posted by: Guest on February-15-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language