Advertisement
Guest User

vrcencode-batch.sh

a guest
Oct 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. set -e
  3. re='([0-9]+) - .+' # change as appropriate
  4. for i in "$1"*.mkv; do
  5.   #echo "$i"
  6.   if [[ "$i" =~ $re ]]; then
  7.     num=${BASH_REMATCH[1]}
  8.     #echo "$i : $num"
  9.     out="$2$num.mp4"
  10.     if [ ! -f $out ]; then
  11.       vrcencode.sh "$i" "$out"
  12.     fi
  13.   fi
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement