Created
August 4, 2024 14:24
-
-
Save Wintus/dc281e2495292441af7f00c1d084016d to your computer and use it in GitHub Desktop.
find mkdir system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref. https://qiita.com/ogiekako/items/8c24cc71ebe518d9d027#fizzbuzz-%E3%81%AE%E6%A7%8B%E6%88%90
ref. https://www.gnu.org/software/findutils/manual/html_node/find_html/Combining-Primaries-With-Operators.html