home
/
code
/
khome.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Break-out video finder as independent script
[khome.git]
/
home
/
bin
/
video-find
diff --git a/home/bin/video-find
b/home/bin/video-find
new file mode 100755
(executable)
index 0000000..
bf9fdc3
--- /dev/null
+++ b/
home/bin/video-find
@@ -0,0
+1,11
@@
+#! /bin/sh
+
+find $@ \
+ -type f \
+ -print0 \
+| xargs \
+ -0 \
+ -P "$(nproc)" \
+ -I {} \
+ sh -c 'printf "%s\0%s\0\0" $(mimetype -b "{}") "{}"' \
+| gawk -v RS='\0\0' -v ORS='\0' '/^video/ {sub("^[^\0]+\0", ""); print}'
This page took
0.028304 seconds
and
4
git commands to generate.