I use this find/wc/awk to identify code files sizes with a final sum:
$ cat Makefile
qa:
@find ./ -type f -name '*.py' -exec \
wc -l "{}" \; | sort -n| awk \
'{printf "%4s %s\n", $$1, $$2}{s+=$$0}END{print s}'
@echo ''
$
If there is no space in the filenames it works well:
$ make qa | tail
545 ./vendored/version.py
550 ./types.py
567 ./interchange/from_dataframe.py
702 ./compute.py
716 ./vendored/docscrape.py
1003 ./dataset.py
1267 ./pandas_compat.py
3686 ./parquet/core.py
14347
In case one of the files have a space in name it does not work any more
$ mv parquet/core.py "parquet/co re.py"
$ ls -la parquet/co*py
-rw-rw-r-- 1 luis luis 139281 juil. 19 20:30 'parquet/co re.py'
(data) luis@spinoza:/tmp/pyarrow$ make qa | tail
545 ./vendored/version.py
550 ./types.py
567 ./interchange/from_dataframe.py
702 ./compute.py
716 ./vendored/docscrape.py
1003 ./dataset.py
1267 ./pandas_compat.py
3686 ./parquet/co <== Pb !
14347
$
I try to protect with " the $$1, e.g. "$$1" with no success