From owner-freebsd-questions@FreeBSD.ORG Sun Dec 26 19:04: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 4AED21065670 for ; Sun, 26 Dec 2010 19:04:49 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0B9318FC15 for ; Sun, 26 Dec 2010 19:04:48 +0000 (UTC) Received: by ywp6 with SMTP id 6so3820140ywp.13 for ; Sun, 26 Dec 2010 11:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to:date :message-id:subject:from:to:cc:content-type; bh=UOFucga31UTZxomiT4tiqiSPFCmc+0vtPsye7YCqZNE=; b=wKxGgcXddsFdtwMfkDG3V2guzpKzQYN8mWm7hozPCEpP/AvzhytCe8AmRtFr+v79h8 zY7c8pFf7Vimfoz7pzy23wDqP66VVsP+6GSv717eFqEylwCnd7tYdWM8U7C0GbKEm2C0 ZRvaClgdP8OjAwywXvASJmM1nb6ofzdcPxqxU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:cc :content-type; b=dnPOePktrYAesMiqm6kKnzMC/yvcC6agDEyyii4U5DEm1nfEQ5HXEwi0T6SCRXtHtC KgWspMNZmePfvgqFY6GgGsXXj3wP2GpEGaOLbKKmFa2OMoo2c6OAkapzJccKhRlV0ACj BMsIyHYpQBCwdbi6K8chjlGjWihU90IyRiOW4= MIME-Version: 1.0 Received: by 10.236.103.38 with SMTP id e26mr1721855yhg.88.1293390288149; Sun, 26 Dec 2010 11:04:48 -0800 (PST) Received: by 10.236.105.197 with HTTP; Sun, 26 Dec 2010 11:04:48 -0800 (PST) Date: Sun, 26 Dec 2010 19:04:48 +0000 Message-ID: From: "b. f." To: Frank Shute Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@FreeBSD.org Subject: Re: randomising tracks: scripting question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2010 19:04:49 -0000 Frank Shute wrote: >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? cat trombone_shorty-backatown.m3u | xargs mplayer ... -shuffle or mplayer ... -playlist trombone_shorty-backatown.m3u -shuffle if they are in a uncommented, one-absolute-path-per-line format without extended directives? b.