Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Dec 2010 12:27:19 -0500
From:      Mark Caudill <markcaudill@me.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: randomising tracks: scripting question
Message-ID:  <4D177AF7.9050402@me.com>
In-Reply-To: <20101226170930.GA68817@orange.esperance-linux.co.uk>
References:  <20101226170930.GA68817@orange.esperance-linux.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
> How would I go about randomising the order of play using
> sh (preferably) or perl?

I fiddled around for a minute without luck but I think between the 
built-in $RANDOM, tail and head you should be able to get a randomize 
going. I'd recommend putting a script together that just pulls a random 
line from a file then work from there. Post your results if yo get one 
working.

-- 
# Mark Caudill



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D177AF7.9050402>