With zsh:
touch -- README **/*(N/e[REPLY+=/README])
It combines recursive globbing (**/*) with glob qualifiers, which here are:
- Nullglob: doesn't trigger an error if there's no match.
- /: restrict to files of type directory
- e[code]:- evaluates the- codefor each file, here appending- /READMEto file path (stored in- $REPLYin the evaluated code).
Or you could use an anonymous function which is passed the list of directories, and which appends the /README to each in the arguments it passes to touch:
() {touch -- $^@/README} . **/*(N/)
(with rc-style array expansion for the anonymous function @rguments using the $^array syntax).
In all those, you can add the Dotglob glob qualifier to also add README to hidden directories.