[nylug-talk] script to randomize file order

Jont Allen jba at auditorymodels.org
Tue May 27 13:24:01 EDT 2003


Dear List,

I saw the message from Peter re /dev/urandom and it reminded me of a 
thing I would like to do, that maybe this list can solve the issue easily.

I would like to listen to some music files. They are in aac format
(I worked at bell labs, and I have some music in that format, since
I have a copy of the encoder). Here is an example of the simple script
that I use to listen

for i in *.aac; do aacplay $i; done

The player is "aacplay", obviously, and will play any file passed
with the argument.

I would like to randomize the files rather than read them in *.aac 
order. I would like to do this from a script. So, I would like to
take the list in $i and randomize the order to $j=random_order($i).

Does anyone have a suggestion on how to do the "random_order"
operation?

Jont


-- 
Jont Allen, 217/244-9567w; jontalle at uiuc.edu
Rm 2061, MC 251; Beckman Inst., 405 N. Mathews, Urbana, IL 61801
http://auditorymodels.org/jba; jba at auditorymodels.org; JontAllen at ieee.org









More information about the nylug-talk mailing list