commit d069807a20826ca4f0382468d2a8ac78b0f5e195 (patch)
parent d288d234631432b0df1b1b6b7ee1ea14e97034ac
Author: Alex Karle <alex@alexkarle.com>
Date: Sun, 8 Dec 2024 13:54:38 -0500
Fix sloc counts
Diffstat:
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
@@ -14,10 +14,11 @@ practice!
Including comments, roughly the following LOC:
```
-py 1689
-scm 1226
-c 295
-go 118
+Python 1751
+Scheme 1226
+Perl 946
+C 295
+Golang 118
```
See [./sloc](./sloc) for methodology.
diff --git a/sloc b/sloc
@@ -1,7 +1,12 @@
#!/bin/sh
find 20* -type f -name '*.*' | \
- egrep '(go|py|scm|c)$' | \
+ egrep '(go|py|scm|c|pl)$' | \
xargs wc -l | \
grep -v total | \
awk '{ split($2, a, "."); s[a[2]] += $1 } END { for (k in s) { printf("%s\t%d\n", k, s[k]) }}' |\
- sort -n -k 2 -r
+ sort -n -k 2 -r |\
+ sed -e 's/py/Python/' \
+ -e 's/go/Golang/' \
+ -e 's/pl/Perl/' \
+ -e 's/scm/Scheme/' \
+ -e 's/c\>/C/'