Advertisement
mayankjoin3

mp3 cut sox first and last n seconds

Aug 26th, 2022
922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.39 KB | Source Code | 0 0
  1. #!/bin/bash
  2. # NOTE : Quote it else use array to avoid problems #
  3.  
  4. for f in  `ls *.mp3`
  5. do
  6.   echo "------Start------"
  7.   echo "Processing $f file..."
  8.   fbname=$(basename "$f" | cut -d. -f1)
  9.   newname="${fbname}_output.mp3"
  10.   echo "Output: ${newname}"
  11.  
  12.   sox $f  $newname  trim 10 -10
  13.   echo "--------End------"
  14.   # take action on each file. $f store current file name
  15.   #cat "$f"
  16. done
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement