mirror of
https://github.com/cheat/cheat.git
synced 2024-12-18 18:55:06 +01:00
Add for plugin
This commit is contained in:
parent
b6137cac8b
commit
70ef6239fe
17
cheat/cheatsheets/for
Normal file
17
cheat/cheatsheets/for
Normal file
@ -0,0 +1,17 @@
|
||||
# basic loop
|
||||
for i in 1 2 3 4 5 6 7 8 9 10
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
|
||||
# loop ls command results
|
||||
for var in `ls -alF`
|
||||
do
|
||||
echo $var
|
||||
done
|
||||
|
||||
# loop specified number of times
|
||||
for i in `seq 1 10`
|
||||
do
|
||||
echo $i
|
||||
done
|
Loading…
Reference in New Issue
Block a user