Bash loop tricks

From Docswiki
Revision as of 12:36, 13 May 2019 by Adk44 (talk | contribs) (Created page with "===Simple counter loop=== <pre> for ((i=1; i <= $max ; i++)) do echo $i done </pre> $max can be a number also.")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Simple counter loop

for ((i=1; i <= $max ; i++))
do
   echo $i
done

$max can be a number also.