summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2021-04-15 11:32:33 -0600
committerAaron Ball <nullspoon@oper.io>2021-04-15 11:34:43 -0600
commita4d0f5ecae14240ce72df4074bbf39553dedbd83 (patch)
treea85f88c2e46401f07b58ce97ca4c921046f432ea
parenta831707ab3f89c7558e3d91b63e3cbe6dce67c23 (diff)
downloadoper.io-a4d0f5ecae14240ce72df4074bbf39553dedbd83.tar.gz
oper.io-a4d0f5ecae14240ce72df4074bbf39553dedbd83.tar.xz
Understanding the Bash Fork Bomb:Better expand code
-rw-r--r--posts/understanding_the_bash_fork_bomb.rst22
1 files changed, 15 insertions, 7 deletions
diff --git a/posts/understanding_the_bash_fork_bomb.rst b/posts/understanding_the_bash_fork_bomb.rst
index 56f7015..cc9b633 100644
--- a/posts/understanding_the_bash_fork_bomb.rst
+++ b/posts/understanding_the_bash_fork_bomb.rst
@@ -77,16 +77,24 @@ and...
The forkbomb mentioned at the beginning of this post uses the second function
syntax. With that understanding, as you can see, using that syntax, it creates
a function called ``:``. Now, let's expand this into a much less compressed
-format now by breaking it into multiple lines and renaming the function from
-``:`` to ``foo``
-
+format now by breaking it into multiple lines
+
.. code-block:: sh
- foo() {
- foo|foo&
- }
- foo
+ :() {
+ :|:&
+ }
+ :
+... and renaming the function from ``:`` to ``foo`` so the syntax doesn't make
+our eyes bleed...
+
+.. code-block:: sh
+
+ foo() {
+ foo|foo&
+ }
+ foo
Now that's much easier to understand. It's fairly clear now that this defines a
function called ``foo`` that calls iteself (recursing), piping the output of

Generated by cgit