top | item 44590994 (no title) apopapo | 7 months ago It's a "for" loop. discuss order hn newest marklgr|7 months ago Could you elaborate? apopapo|7 months ago A for loop in a shell script may sometimes look like this:`for ((i = 0 ; i < max ; i++ )); do echo "$i"; done`Here this is essentially a "while" loop, meaning it will keep executing the commands as long as we don't reach `exit 1`.(; flock -n 9 || exit 1; # ... commands executed under lock ...; ) load replies (1)
marklgr|7 months ago Could you elaborate? apopapo|7 months ago A for loop in a shell script may sometimes look like this:`for ((i = 0 ; i < max ; i++ )); do echo "$i"; done`Here this is essentially a "while" loop, meaning it will keep executing the commands as long as we don't reach `exit 1`.(; flock -n 9 || exit 1; # ... commands executed under lock ...; ) load replies (1)
apopapo|7 months ago A for loop in a shell script may sometimes look like this:`for ((i = 0 ; i < max ; i++ )); do echo "$i"; done`Here this is essentially a "while" loop, meaning it will keep executing the commands as long as we don't reach `exit 1`.(; flock -n 9 || exit 1; # ... commands executed under lock ...; ) load replies (1)
marklgr|7 months ago
apopapo|7 months ago
`for ((i = 0 ; i < max ; i++ )); do echo "$i"; done`
Here this is essentially a "while" loop, meaning it will keep executing the commands as long as we don't reach `exit 1`.
(; flock -n 9 || exit 1; # ... commands executed under lock ...; )