Skip to content

Instantly share code, notes, and snippets.

@TvL2386
Created January 27, 2017 13:39
Show Gist options
  • Save TvL2386/1384eaec3dd2bbeeb7dcbfbbd35f1d34 to your computer and use it in GitHub Desktop.
Save TvL2386/1384eaec3dd2bbeeb7dcbfbbd35f1d34 to your computer and use it in GitHub Desktop.
#!/bin/bash
inputfiles=(*.mp4)
declare -a outputfiles
for file in "${inputfiles[@]}"
do
outputfiles+=("${file%.*}.test.${file##*.}")
done
echo "Input Files"
for item in "${inputfiles[@]}"
do
printf " %s\n" "$item"
done
echo "Output Files"
for item in "${outputfiles[@]}"
do
printf " %s\n" "$item"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment