User Tools

Site Tools


bash:for_loop

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
bash:for_loop [2020/07/15 09:30] – external edit 127.0.0.1bash:for_loop [2021/01/26 12:11] (current) – removed peter
Line 1: Line 1:
-====== BASH - For loop ====== 
  
-The for loop iterates over codes efficiently. 
- 
-<code bash> 
-#!/bin/bash 
- 
-for (( counter=1; counter<=10; counter++ )) 
-do 
-echo -n "$counter " 
-done 
- 
-printf "\n" 
-</code> 
- 
-This should print out the numbers 1 to 10. 
bash/for_loop.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki