alias for unique lines of code
This commit is contained in:
parent
c1295c2208
commit
f9b88bed52
@ -102,6 +102,19 @@ function skip {
|
||||
cut -d' ' -f$n-
|
||||
}
|
||||
|
||||
# Unique lines of code
|
||||
# Via https://text.causal.agency/004-uloc.txt
|
||||
function uloc {
|
||||
find . -type f \( \
|
||||
-name '*.py' \
|
||||
-o -name '*.rb' \
|
||||
-o -name '*.go' \
|
||||
-o -name '*.java' \
|
||||
-o -name '*.c' -o -name '*.h' \
|
||||
-o -name '*.js' \
|
||||
\) -exec cat \{\} \; | sort -u | wc -l
|
||||
}
|
||||
|
||||
# Find files bigger than X size and sort them by size
|
||||
function biggerthan() {
|
||||
find . -size "+$*" -type f -print0 | xargs -0 ls -Ssh | sort -z
|
||||
|
Loading…
Reference in New Issue
Block a user