From owner-freebsd-questions@FreeBSD.ORG Wed Jun 18 09:54:14 2003 Return-Path: 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 448F037B401 for ; Wed, 18 Jun 2003 09:54:14 -0700 (PDT) Received: from adsl-64-161-78-226.dsl.lsan03.pacbell.net (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 7C5EE43FBF for ; Wed, 18 Jun 2003 09:54:13 -0700 (PDT) (envelope-from oremanj@adsl-64-161-78-226.dsl.lsan03.pacbell.net) Received: (qmail 35354 invoked by uid 1001); 18 Jun 2003 16:56:36 -0000 Date: Wed, 18 Jun 2003 09:56:36 -0700 From: Joshua Oreman To: questions@freebsd.org Message-ID: <20030618165636.GD34991@webserver.get-linux.org> References: <20030618123103.1a26b58d.johann@broadpark.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030618123103.1a26b58d.johann@broadpark.no> User-Agent: Mutt/1.4.1i Subject: Re: Ways to Perfect my MP3 Backup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2003 16:54:14 -0000 On Wed, Jun 18, 2003 at 12:31:03PM +0200 or thereabouts, --@FreeBSD.ORG seemed to write: > > Hello ,)- > > I am in the below directory, trying to perfect my MP3 albums before I back them all up > for my FreeBSD 5.1 upgrade. I need a script to enter each directory, run `cfv -v -C -t md5 *.mp3' > and turn the produced *md5 checksum file into a 00*md5 matching pattern of the mandatory 00*nfo. > Then, do `ls *mp3 > 00*m3u' matching the same pattern. Finally, strip ^M and trailing whitespace > from the 00*nfo. Exit the directory, enter next ... I think this should do the trick. Make sure to fill in the blanks, so to speak. #! /bin/sh # mp3 backup helper for dir in *; do OLDWD=`pwd` cd $dir cfv -v -C -t md5 *.mp3 [do what you want after cfv part, i didn't understand that part about matching pattern] perl -pi.orig 's/[\012\s]+$//' 00*nfo cd $OLDWD done -- Josh > > /usr/home/johann/nfs/backup/mp3 > +-----hiphop > | +-----9th_wonder-gods_stepson-cd-2003-jce > | +-----arsonists-as_the_world_burns-final-1999-apc > | +-----beat_junkies-wild_stylus-cd-2003-sol > | +-----classified-now_whut-ep-1999-ftd > | +-----diaz-velkommen_hjem_andres-no-2003-wlm > | +-----dj_jazzy_jeff-the_magnificent-2002-esc > | +-----equicez-state_of_emergency-generation_equiz-no-retail-2003-esc > | +-----filthy-volume_001-2003-ftd > | +-----hydroponic_sound_system-routine_insanity-2000-cms > | +-----ill_mitch-punch_while_rap-2002-ftd > | +-----jay_dee-vintage-2003-cms > | +-----jay_dee_and_madlib-are_jaylib-2003-ego > | +-----johnny_five-summer-2002-cms > | +-----julius_papp-lazy_daze_vol_6-mixtape-1998-cms > | +-----lone_catalysts_feat_talib_kewli_and_rubix-due_process-vls-2002-cms > | +-----lowd-calligraphy-vls-2002-ftd > | +-----mc_solaar-obsolete-cdm2-fr-1994-0mni > | +-----sam_the_kid-beats_vol_1-amor-2001-sns > > The final result should look like this: > > # ls > 00-jay_dee_and_madlib-are_jaylib-ego.m3u > 00-jay_dee_and_madlib-are_jaylib-ego.md5 > 00-jay_dee_and_madlib-are_jaylib-ego.nfo > 01-jay_dee_and_madlib-intro-ego.mp3 > 02-jay_dee_and_madlib-boom_bip-ego.mp3 > 03-jay_dee_and_madlib-the_jam-ego.mp3 > 04-jay_dee_and_madlib-now_you_know-ego.mp3 > 05-jay_dee_and_madlib-bitches_niggas_want-ego.mp3 > 06-jay_dee_and_madlib-dubz-ego.mp3 > 07-jay_dee_and_madlib-clap-ego.mp3 > 08-jay_dee_and_madlib-gorilla_shit-ego.mp3 > 09-jay_dee_and_madlib-different-ego.mp3 > 10-jay_dee_and_madlib-la_la_la-ego.mp3 > 11-jay_dee_and_madlib-smootherness-ego.mp3 > 12-jay_dee_and_madlib-sex_freaks_feat_quasimoto-ego.mp3 > 13-jay_dee_and_madlib-spelling_b-ego.mp3 > 14-jay_dee_and_madlib-dee_and_lib_go_to_bed-ego.mp3 > 15-jay_dee_and_madlib-bonus_track_1-ego.mp3 > 16-jay_dee_and_madlib-bonus_track_2-ego.mp3 > > I really hope someone out there are able to help me. > Doing this manually would take too much time, and I don't have so much left in this country. > > Thanks, > ==j > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"