Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created January 22, 2015 23:42
Show Gist options
  • Select an option

  • Save yosmoc/3904763091086e4ed80c to your computer and use it in GitHub Desktop.

Select an option

Save yosmoc/3904763091086e4ed80c to your computer and use it in GitHub Desktop.
#!/bin/bash
IFS=$'\n'
files=$(find . -type f -name "*.mp3")
trim=2
for file in $files
do
file_without_extension=${file%.*}
echo "trim "${trim}" s from "${file}.mp3
sox $file ${file_without_extension}_.mp3 trim $trim
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment