Created
June 6, 2016 01:43
-
-
Save lanzafame/1e02669831ecdad40a03a43b320890ad to your computer and use it in GitHub Desktop.
Create file in all the directories in the current directory.
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
# Create __init__.py in all the directories in the current directory. | |
# . | |
# ├── clique | |
# │ └── clique.py | |
# ├── __init__.py | |
# ├── metro | |
# │ └── metro.py | |
# ├── pop | |
# │ └── pop.py | |
# ├── service | |
# │ └── service.py | |
# └── switch | |
# └── switch.py | |
for D in `find . -type d`; do | |
touch $D/__init__.py; | |
done | |
# Result: | |
# . | |
# ├── clique | |
# | ├── __init__.py | |
# │ └── clique.py | |
# ├── __init__.py | |
# ├── metro | |
# | ├── __init__.py | |
# │ └── metro.py | |
# ├── pop | |
# | ├── __init__.py | |
# │ └── pop.py | |
# ├── service | |
# | ├── __init__.py | |
# │ └── service.py | |
# └── switch | |
# ├── __init__.py | |
# └── switch.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment