diff options
author | braxtonhall | 2022-10-25 06:04:53 +0000 |
---|---|---|
committer | braxtonhall | 2022-10-25 06:04:53 +0000 |
commit | 8b4b5107bc40aa8e4d5dfece7b582494c7cde068 (patch) | |
tree | d183b38eea5be091efc3697a2cbbe8a7a9fe3fe0 | |
parent | d8809640625ff7113b3e534a0ddc84d970674570 (diff) |
Ruin my poor disk
-rw-r--r-- | entries/braxtonhall/wc/.gitignore | 1 | ||||
-rw-r--r-- | entries/braxtonhall/wc/fib.sh | 18 | ||||
-rw-r--r-- | people.json | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/entries/braxtonhall/wc/.gitignore b/entries/braxtonhall/wc/.gitignore new file mode 100644 index 0000000..f845a7d --- /dev/null +++ b/entries/braxtonhall/wc/.gitignore @@ -0,0 +1 @@ +*.fib
\ No newline at end of file diff --git a/entries/braxtonhall/wc/fib.sh b/entries/braxtonhall/wc/fib.sh new file mode 100644 index 0000000..c909617 --- /dev/null +++ b/entries/braxtonhall/wc/fib.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +rec () { + shopt -s nullglob dotglob + + if [ $2 == "0" ]; then + : + elif [ $2 == "1" ]; then + echo "🥵" > "$1/$2.fib" + else + mkdir "$1/$2" + rec "$1/$2" $(($2 - 1)) + rec "$1/$2" $(($2 - 2)) + fi +} + +rec $(pwd) $1 +find $(pwd)/$1 -type f | wc -l diff --git a/people.json b/people.json index 60654a5..6ea11aa 100644 --- a/people.json +++ b/people.json @@ -30,6 +30,10 @@ { "name": "types", "link": "./entries/braxtonhall/types/index.ts" + }, + { + "name": "wc", + "link": "./entries/braxtonhall/wc/fib.sh" } ] }, |