From owner-freebsd-questions@FreeBSD.ORG Sun Dec 26 17:40:49 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 9BE77106566B for ; Sun, 26 Dec 2010 17:40:49 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id 6311F8FC13 for ; Sun, 26 Dec 2010 17:40:49 +0000 (UTC) Received: from 174-21-101-148.tukw.qwest.net ([174.21.101.148] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PWuZ6-000459-0W for freebsd-questions@freebsd.org; Sun, 26 Dec 2010 09:39:29 -0800 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Sun, 26 Dec 2010 09:40:43 -0800 Date: Sun, 26 Dec 2010 09:40:43 -0800 From: Chip Camden To: FreeBSD Questions Message-ID: <20101226174043.GB10951@libertas.local.camdensoftware.com> Mail-Followup-To: FreeBSD Questions References: <20101226170930.GA68817@orange.esperance-linux.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <20101226170930.GA68817@orange.esperance-linux.co.uk> User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-PGP-Key: http://pgp.mit.edu:11371/pks/lookup?search=0xD6DBAF91 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com 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 17:40:49 -0000 --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Frank Shute on Sunday, 26 December 2010: > I generally play my tracks of an album like so: >=20 > for track in $(cat trombone_shorty-backatown.m3u); do > mplayer $track > done >=20 > They then play in the correct order. >=20 > How would I go about randomising the order of play using > sh (preferably) or perl? >=20 > Sorry for the OT posting but I thought a brainteaser might clear the > fog caused by excessive Xmas indulgence ;) >=20 >=20 > Regards, >=20 > --=20 >=20 > Frank >=20 > Contact info: http://www.shute.org.uk/misc/contact.html >=20 >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" change "cat t...n.m3u" to "random < t..n.m3u" --=20 Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F http://camdensoftware.com | http://chipstips.com | http://chipsquips= .com --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJNF34bAAoJEIpckszW26+RiEYH/AzNOr/Is9HY2Mp2UKMxTtKY czw0y677DvYg9jcbS9QDJnnmV50DYGUA/LmVLuCfRz60V8NUvP5iiRoZQFbBlZT/ YqsG/OCt9Qg3rq9nnHa2FhuV/+n/O6Lhs6lQjGGbi0IstP6fd/RaXlpKlGsmO2i5 vv/QzNnYLQt3NeWXx/kK3MZIugpm27Ui4XpUSbUsl4I46OThpetB/fWJS8cirTxB Ot3I6c1qCES1H9dvn4Mu+D8eUfprZjuhy+znQyf+UIP0GMm2xyv+aTKPVEnN7jja jEhfO4CQZI8bHRDub/cMPd7bocFeUJ3kQvg1D/fSC8JkARKGGC092eZ8t7iq8Nw= =XHkq -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU--