TODOs per File
This folder has folders inside it. For every file whose name ends in .py and that has at least one line containing TODO, print its path, a space and the number of such lines, like ./src/app.py 2, sorted by path. Files without a TODO are left out.
Example 1
run.py
x = 1 # TODO y = 2
src/app.py
# TODO a # TODO b z
src/clean.py
ok
notes.txt
TODO buy milk
prints
./run.py 1 ./src/app.py 2
Constraints
- Up to 12 files, in folders up to 3 deep
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- The Biggest FileHard
- Totals per GroupHard
- Word Count TableHard
- Count the LinesBeginner
- Count the WordsBeginner
- First Three LinesBeginner
- Hello, NameBeginner
- How Many ErrorsBeginner