User Tools

Site Tools


bash:for_loop

Differences

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

Link to this comparison view

Next revision
Previous revision
bash:for_loop [2019/12/12 20:22] – created peterbash: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.1576182149.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki