Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Dec 2010 09:40:43 -0800
From:      Chip Camden <sterling@camdensoftware.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: randomising tracks: scripting question
Message-ID:  <20101226174043.GB10951@libertas.local.camdensoftware.com>
In-Reply-To: <20101226170930.GA68817@orange.esperance-linux.co.uk>
References:  <20101226170930.GA68817@orange.esperance-linux.co.uk>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Quoth Frank Shute on Sunday, 26 December 2010:
> I generally play my tracks of an album like so:
> 
> for track in $(cat trombone_shorty-backatown.m3u); do
> mplayer $track
> done
> 
> They then play in the correct order.
> 
> How would I go about randomising the order of play using
> sh (preferably) or perl?
> 
> Sorry for the OT posting but I thought a brainteaser might clear the
> fog caused by excessive Xmas indulgence ;)
> 
> 
> Regards,
> 
> -- 
> 
>  Frank
> 
>  Contact info: http://www.shute.org.uk/misc/contact.html
> 
> 
> _______________________________________________
> 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"

change "cat t...n.m3u" to "random < t..n.m3u"

-- 
Sterling (Chip) Camden    | sterling@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com        | http://chipsquips.com

[-- Attachment #2 --]
-----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-----
help

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