Re: use of comm and sort tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Strip off the extentions using basename, then use diff.
for i in $(cat m4a.txt);do
basename $i .m4a >> first.txt
done

for i in $(cat mp3.txt);do
basename $i .mp3 >> second.txt
done
 diff first.txt second.txt
If your filenames contain spaces, the for loops above will not work.
Use the detox program to fix that first.
Regards, Willem


On Thu, 12 May 2022, Linux for blind general discussion wrote:

I wrote previously about ffmpeg and audio variable bitrate. After conversion, there are some files that did not convert. I would like to compare two listings and discover which ones are missing. So, we have these commands:
find . -type f -name \*.m4a | sed -e 's@.*/@@' -e 's/\.4a$//' > m4a.txt
find raw2 -type f -name \*.mp3 | sed -e 's@.*/@@' -e 's/\.mp3$//' > mp3.txt
Now I want to run comm and have it dump to another file which lines in m4a.txt do not exist in mp3.txt. How would I go about doing that? Or is there a better way?

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/blinux-list



_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/blinux-list




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]