fixes and improvemens
[distro-setup] / brc
diff --git a/brc b/brc
index 75a7393eb15c7301d19b22b6a5498fcb9d4b70a1..7d58392d65fe59e5870d862232690bb74a527291 100644 (file)
--- a/brc
+++ b/brc
@@ -1011,6 +1011,9 @@ etail2() {
 ccomp tail etail etail2
 
 
+showkeys() {
+  ssh "$@" cat .ssh/authorized_keys{,2}
+  }
 
 
 # print exim old pids
@@ -1115,6 +1118,20 @@ faf() { # find all files. use -L to follow symlinks
        -o -name .undo-tree-history -prune \) -type f 2>/dev/null
 }
 
+# usage ffconcat FILES_TO_CONCAT OUTPUT_FILE
+ffconcat() {
+  local tmpf
+  tmpf=$(mktemp)
+  printf "file '%s'\n" "$1" >$tmpf
+  while (( $# > 1 )); do
+    shift
+    printf "file '%s'\n" "$1" >>$tmpf
+  done
+  # https://trac.ffmpeg.org/wiki/Concatenate
+  ffmpeg -f concat -safe 0 -i $tmpf -c copy "$1"
+  rm $tmpf
+}
+
 # full path without resolving symlinks
 fp() {
   local dir base