From 70ef6239fe175582525e2198ea701ffa524f83aa Mon Sep 17 00:00:00 2001 From: shigemk2 Date: Fri, 1 Jan 2016 00:15:51 +0900 Subject: [PATCH] Add for plugin --- cheat/cheatsheets/for | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cheat/cheatsheets/for diff --git a/cheat/cheatsheets/for b/cheat/cheatsheets/for new file mode 100644 index 0000000..db57266 --- /dev/null +++ b/cheat/cheatsheets/for @@ -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 \ No newline at end of file