use of comm and sort tools

Linux for blind general discussion blinux-list at redhat.com
Thu May 12 12:08:54 UTC 2022


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 at .*/@@' -e 's/\.4a$//' > m4a.txt
> find raw2 -type f -name \*.mp3 | sed -e 's at .*/@@' -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 at redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>
>



More information about the Blinux-list mailing list