Quote Originally Posted by Vaphell View Post
hm, works here on the test file... maybe try changing the pattern to this one in blue
Code:
$ awk -v threshold=-4 '
>       /^\// { file=$0 }
>       /TRACK_GAIN/ { t_gain=$1; sub( /.*=/, "", t_gain ); }
>       /ALBUM_GAIN/ { a_gain=$1; sub( /.*=/, "", a_gain ); }
>       /ALBUM_PEAK/ { if (t_gain < threshold || a_gain < threshold) print file "\ntrack gain: " t_gain ", album gain: " a_gain; }
>     ' in.txt
/media/Storage/Music/Rock/Coldplay - Discography Lite/2000-07-10 - Parachutes - Parlophone 527 7832 GB/10 Everything's Not Lost _ Life Is for Living.flac
track gain: -8.11, album gain: -8.11
/media/Storage/Music/Rock/Coldplay - Discography Lite/2002-08-26 - A Rush of Blood to the Head - Parlophone 540 5042 GB/02 In My Place.flac
track gain: -8.67, album gain: -8.67
/media/Storage/Music/Rock/Coldplay - Discography Lite/2002-08-26 - A Rush of Blood to the Head - Parlophone 540 5042 GB/03 God Put a Smile Upon Your Face.flac
track gain: -9.28, album gain: -9.28
...
Hello Again Vaphell,

This is a snippet of what I am getting after changing that:
artist=Fleetwood Mac
title=The City
REPLAYGAIN_TRACK_GAIN=-2.05 dB
REPLAYGAIN_ALBUM_GAIN=-2.05 dB
REPLAYGAIN_ALBUM_PEAK=0.73333740
awk: cannot open in.txt (No such file or directory)
artist=Fleetwood Mac
title=Miles Away
REPLAYGAIN_TRACK_GAIN=-3.04 dB
REPLAYGAIN_ALBUM_GAIN=-3.04 dB
REPLAYGAIN_ALBUM_PEAK=0.91717529
awk: cannot open in.txt (No such file or directory)
artist=Fleetwood Mac
title=Somebody
REPLAYGAIN_TRACK_GAIN=-2.24 dB
REPLAYGAIN_ALBUM_GAIN=-2.24 dB
REPLAYGAIN_ALBUM_PEAK=0.93945312
awk: cannot open in.txt (No such file or directory)

So it's still printing higher(or is that lower) than -4dB and that other awk: ect.ect. A value less than -4dB going toward 0dB is a good thing and I don't need to print that and -4dB going towards -10dB is a bad thing and I do need to print that. Sorry, I get confused a bit on the higher/lower explanation I guess something in my script might be throwing it off maybe?? I don't have a clueThanks again Vaphell

Cheers,

Singtoh