Skip to content

Instantly share code, notes, and snippets.

@d630
Last active June 13, 2016 09:59
Show Gist options
  • Save d630/e0c794bba8516d7a589337d9bd677616 to your computer and use it in GitHub Desktop.
Save d630/e0c794bba8516d7a589337d9bd677616 to your computer and use it in GitHub Desktop.
bash: Indentation
# 10
while ((x == 1))
do
echo foo
echo bar
done
for ((i=0; i < 10; i++))
do
if ((i % 2 == 0))
then echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"
fi
done
# 11
while ((x == 1))
do
echo foo
echo bar
done
for ((i=0; i < 10; i++))
do
if ((i % 2 == 0))
then echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"
fi
done
# 12
while ((x == 1))
do
echo foo
echo bar; done
for ((i=0; i < 10; i++))
do
if ((i % 2 == 0))
then echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"; fi; done
# 13
while ((x == 1))
do
echo foo
echo bar; done
for ((i=0; i < 10; i++))
do
if ((i % 2 == 0))
then echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"; fi; done
# 14
while ((x == 1))
do echo foo
echo bar; done
for ((i=0; i < 10; i++))
do if ((i % 2 == 0))
then echo foo "$i"
else echo fooElse "$i"
echo bar "$i"; fi; done
# 15
while ((x == 1))
do echo foo
echo bar; done
for ((i=0; i < 10; i++))
do if ((i % 2 == 0))
then echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"; fi; done
# 16
while ((x == 1))
do
echo foo
echo bar; done
for ((i=0; i < 10; i++))
do
if ((i % 2 == 0))
then echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"; fi; done
# 17
while
((x == 1))
do
echo foo
echo bar; done
for ((i=0; i < 10; i++))
do
if
((i % 2 == 0))
then
echo foo "$i"
else
echo fooElse "$i"
echo bar "$i"; fi; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment