From owner-freebsd-questions@FreeBSD.ORG Sun Dec 26 18:27:55 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C96106566C for ; Sun, 26 Dec 2010 18:27:55 +0000 (UTC) (envelope-from markcaudill@me.com) Received: from asmtpout029.mac.com (asmtpout029.mac.com [17.148.16.104]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3A68FC16 for ; Sun, 26 Dec 2010 18:27:55 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from Mark-Caudills-MacBook-Pro.local (c-69-251-74-109.hsd1.md.comcast.net [69.251.74.109]) by asmtp029.mac.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 64bit)) with ESMTPSA id <0LE1006OPPTJT030@asmtp029.mac.com> for freebsd-questions@freebsd.org; Sun, 26 Dec 2010 09:27:21 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1010190000 definitions=main-1012260057 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2010-12-26_06:2010-12-25, 2010-12-26, 1970-01-01 signatures=0 Message-id: <4D177AF7.9050402@me.com> Date: Sun, 26 Dec 2010 12:27:19 -0500 From: Mark Caudill User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 To: freebsd-questions@freebsd.org References: <20101226170930.GA68817@orange.esperance-linux.co.uk> In-reply-to: <20101226170930.GA68817@orange.esperance-linux.co.uk> X-Mailman-Approved-At: Sun, 26 Dec 2010 18:42:23 +0000 Subject: Re: randomising tracks: scripting question 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: Sun, 26 Dec 2010 18:27:55 -0000 > 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