Skip to content

Instantly share code, notes, and snippets.

@Wintus
Created August 4, 2024 14:24
Show Gist options
  • Select an option

  • Save Wintus/dc281e2495292441af7f00c1d084016d to your computer and use it in GitHub Desktop.

Select an option

Save Wintus/dc281e2495292441af7f00c1d084016d to your computer and use it in GitHub Desktop.

Revisions

  1. Wintus created this gist Aug 4, 2024.
    11 changes: 11 additions & 0 deletions FizzBuzz.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    mkdir -p d/x

    find d -regextype posix-extended -regex 'd(/x){1,29}' -exec mkdir -p '{}'/x \;

    find d -regextype posix-extended \
    -regex 'd((/x){3})+' -printf "Fizz" , \
    -regex 'd((/x){5})+' -printf "Buzz" , \
    -regex 'd((/x){3})+' -o \
    -regex 'd((/x){5})+' -o \
    -regex 'd(/x)+' -printf "%d" , \
    -printf "\n"