Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- dest="/path/to/dir"
- trsh=256
- IFS='|'
- while read -r author title year bitrate; do
- if [[ "$((bitrate/1000))" -lt $trsh ]]; then
- echo "Bitrate is below $trsh Kbps"
- exit 1
- fi
- mv "$1" "$dest/${author}-${title}-${year}.${1##*.}"
- done < <(mediainfo --Inform="General;%Performer%|%Track%|%Recorded_Date%|%BitRate%" "$1")
Add Comment
Please, Sign In to add comment