Looking for "play"

Simon Bassett spbasset at ptd.net
Mon Dec 25 04:23:52 UTC 2006


Are you referring to /usr/bin/play that comes with sox?

On Sun, 2006-12-24 at 20:03 -0500, Jeffrey F. Bloss wrote:
> Michael Satterwhite wrote:
> 
> > In the past, when I wanted to play a wav file from the command line, I
> > invoked "play". I don't see that anywhere in the Ubuntu distribution.
> > I've done an "apt-cache search" and "apt-file search" for it, and it
> > doesn't show up.
> > 
> > Is this program available anywhere in Ubuntu? If not, (a) what command
> > line program is used in its place and/or (b) where would I find it to
> > compile for myself?
> 
> The command you're searching for is probably 'aplay', but it certainly
> depends on your configuration. 
> 
> From the FWIW department, here's a script I find invaluable. Don't
> remember where it came from. Maybe the book "Wicked Cool Shell
> Scripts". It lists all exececutables in your $PATH and give a running
> count, but combined with some 'grep' magic it's a fine way to find
> certain types of files or related commands. Enjoy!
> 
> ### BEGIN SCRIPT 
> #!/bin/bash
> 
> myPATH="$(echo $PATH | sed -e 's/ /~~/g' -e 's/:/ /g')"
> count=0 ; nonex=0
> 
> for dirname in $myPATH ;  do
>   directory="$(echo $dirname | sed 's/~~/ /g')"
>   if [ -d "$directory" ] ; then
>     for command in $(ls "$directory") ; do
>       if [ -x "$directory/$command" ] ; then
>         echo $directory/$command
>         count="$(( $count + 1 ))"
>       else
>         nonex="$(( $nonex + 1 ))"
>       fi
>     done
>   fi
> done
> 
> echo "$count commands, and $nonex entires not marked executable"
> exit 0
> ### END SCRIPT
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061224/36bed557/attachment.sig>


More information about the ubuntu-users mailing list