From S1MP3 Wiki
#!/bin/sh -ue
# http://wiki.s1mp3.org/S1mp3ls -- On GNU/Linux List S1MP3 files in the same
# native order as seen in its LCD window. One could save the output to a PDA.
# We do not wish to add the complexity of examining the contents of files,
# therefore we just list filenames, not titles.
# Copyright : http://www.fsf.org/copyleft/gpl.html
# Author : Dan Jacobson http://jidanni.org/
# Created On : Mon Feb 11 11:11:49 2008
# Last Modified On: Tue Mar 18 01:59:44 2008
# Update Count : 43
test $# -eq 1||{ echo Usage: $0 S1MP3_root_directory 1>&2; exit 1;}
cd $1; echo `basename $0` $1 `LC_ALL=C date`
set -- `find -type d ! -empty`
for types in 'MP3 WMA OGG' 'WAV ACT' #any more?
do echo === $types ===
for d
do for type in $types
do find $d -maxdepth 1 -iname \*.$type -printf %f\\n
done|perl -nwe '$k++; $l.=sprintf "%03.0f %s", $k, $_; END{
exit unless defined $l; $_="'$d'"; s@^\./?@@; s@$@/@; print "$_\n$l"}'
done #Using File::Find would only add complexity
echo
done