From owner-freebsd-questions@FreeBSD.ORG Sat Feb 11 14:13:51 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CB8F16A420 for ; Sat, 11 Feb 2006 14:13:51 +0000 (GMT) (envelope-from vaaf@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id EACFF43D49 for ; Sat, 11 Feb 2006 14:13:50 +0000 (GMT) (envelope-from vaaf@broadpark.no) Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IUJ00IKH0V2HW40@osl1smout1.broadpark.no> for questions@freebsd.org; Sat, 11 Feb 2006 15:13:50 +0100 (CET) Received: from urban.broadpark.no ([213.187.181.70]) by osl1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IUJ004CW0V0IR60@osl1sminn1.broadpark.no> for questions@freebsd.org; Sat, 11 Feb 2006 15:13:50 +0100 (CET) Date: Sat, 11 Feb 2006 15:13:54 +0100 From: Kristian Vaaf To: questions@freebsd.org Message-id: <7.0.1.0.2.20060211150451.02150468@broadpark.no> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT Cc: Subject: File verification script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 14:13:51 -0000 Hello! I need a simple script that uses CFV to report on broken MP3 albums. All my MP3 albums contain an .sfv file that list MP3 tracks with their CRC values. I just need something simple like: (vaaf@arba)(16:23:02/10/06) (%:~) verify curtis_mayfield-superfly_ost-1972: Corrupt miles_davis-four_and_more-reissue-2005: Corrupt sun_ra_and_his_outer_space_arkestra-nuclear_war-2002: Corrupt How would that look like? The reason I'd prefer something as simple as this, is because most SFV validation tools are so bloated with useless features. Anyway ... I have different SFV script though. It uses CFV to go into all MP3 albums containing an information file (.nfo) and then generating an SFV of the MP3 tracks, giving it the same name as the .nfo. For those who are curious, it looks like this: #!/usr/local/bin/bash # # Generate SFV and M3U based on NFO. # $ARBA: seal.sh,v 1.0 2007/11/11 15:09:05 vaaf Exp $ # # Requires CFV. # for file in `find -s $(pwd) -name \*.nfo`; do directory="`dirname ${file}`" prefix="`basename ${file} | sed 's/.nfo//g'`" current="`basename ${directory}`" sfv="${directory}/${prefix}.sfv" m3u="${directory}/${prefix}.m3u" cd ${directory} rm -f *.sfv; rm -f *.m3u touch ${sfv}; cfv -Cq *.mp3 cat ${current}.sfv | awk '! /^;/' > ${sfv} rm -f ${current}.sfv for mp3 in *.mp3; do echo "${mp3}" >> ${m3u}; done echo "$current: Done" done Take care people! Vaaf