123456789101112 | #!/bin/bash if [[ -z $1 || -z $2 ]]; then echo "Must supply at least two arguments."; return 1; fi ext=`echo $1 | sed -e "s/.*\.//"`; ffmpeg -f concat -safe 0 \ -i <(for f in "$@"; do echo "file '$PWD/$f'"; done) \ -c copy output.$ext |