Skip to content

Instantly share code, notes, and snippets.

@kaihendry
Created July 12, 2020 05:28
Show Gist options
  • Save kaihendry/c065f34727b6df94a1814d4735fca0b9 to your computer and use it in GitHub Desktop.
Save kaihendry/c065f34727b6df94a1814d4735fca0b9 to your computer and use it in GitHub Desktop.
#!/bin/bash
count () {
test -d "$1" || cd "$1"
for i in *
do
dirsep=$(test -d $i && echo /)
echo ${i}${dirsep} $(find $i -type f -exec cat {} + | wc -l)
done | dmenu -l 10 | count
}
count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment