2

I have a directory that have multiple subdirectories with git repositories. I want to add desktop.ini to all .gitignore files in these subdirectories.

I know i can do echo "desktop.ini" | tee -a .gitignore, but it does not work recursively.

muru
  • 193,181
  • 53
  • 473
  • 722

1 Answers1

3

In bash, enabled recursive globbing:

shopt -s globstar

Then do:

echo "desktop.ini" | tee -a **/.gitignore
muru
  • 193,181
  • 53
  • 473
  • 722