Looking for "play"

Jeffrey F. Bloss jbloss at tampabay.rr.com
Mon Dec 25 01:03:24 UTC 2006

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!


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 ))"
        nonex="$(( $nonex + 1 ))"

echo "$count commands, and $nonex entires not marked executable"
exit 0

     _?_      Outside of a dog, a book is a man's best friend.
    (o o)         Inside of a dog, it's too dark to read.
-oOO-(_)--OOo-------------------------------[ Groucho Marx ]--
    grok!              Registered Linux user #402208
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 892 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061224/17a2f625/attachment.pgp>

More information about the ubuntu-users mailing list