Page 1 of 1

Need a Bash script

Posted: Mon Jan 28, 2008 4:44 pm
by Benjamin
Anyone want to have a go at writing a bash script that will do the following?

1. Iterate the cwd and all subfolders searching for audio files
2. Put them in random order
3. Play them all using mplayer or xine

I'd do it myself but have no clue.

Thanks!

Re: Need a Bash script

Posted: Mon Jan 28, 2008 6:36 pm
by Christopher
Take a look at the find command. You can search directories and find files with specific extensions. The you can run a program for each one, or concat them to a temp file and then play them.