From 7c87795057e0a269c2c67eb7d3ad41d9227aa7df Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 17 May 2024 20:06:30 -0700 Subject: [PATCH] update `exts` so it actually works properly --- home/shrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/shrc b/home/shrc index edca705..b5af74c 100644 --- a/home/shrc +++ b/home/shrc @@ -165,7 +165,7 @@ counts() ### @- count files in the current directory, including files found recu { find . | wc -l "$@"; } exts() ### @- count and sort file extensions in the current directory, including files found recursively. - { find -type f | grep -o '\\.[^/.]*$' | sort | uniq -c | sort -n "$@"; } + { find -type f | sed -e 's@.*/@@' -e 's@.*\.@@' | tr A-Z a-z | scount; } nocom() ### @- strip single-line C-like and shell-like comments. { grep -Ev --line-buffered --color=never "^[[:space:]]*(//|#)" "$@"; }