Give a command that writes the number of lines to stdout of all regular files below the current directory (i.e. including all underlying subdirectories) that end with the given file extension (for example py). Make sure the command never writes anything to stderr.
The file extension is given as the environment variable $EXTENSION. You can use this variable by inserting $EXTENSION anywhere in the command where the extension must occur. For example, if you have a solution that works in particular for the extension py, you can turn it into a generic solution by replacing all occurrences of py by $EXTENSION.
Say, for example, that the current directory has the following directory structure (linesofcode.zip1):
+-- __init__.py (10 lines)
+-- application.py (12 lines)
+-- init
| +-- authentication.txt (5 lines)
| `-- database.py (20 lines)
+-- mediaPlayer.py (45 lines)
+-- reader.java (16 lines)
`-- reader.class
If the command is executed for Python files (extension py), the number 87 must be written to stdout. For Java files (extension java) the number 16 must be written to stdout.