Quote:
Originally Posted by Eradicatore
Here was my script that worked on my Mac, but not the kindle:
#!/bin/sh
FILES=(*.png)
while true
do
n=${#FILES[@]}
f="${FILES[RANDOM % n]}"
while [ "$f" = "$last" ]
do
f="${FILES[RANDOM % n]}"
done
last=$f
echo "WALLPAPER: $f"
sleep 2
done
|
Different command processor.
The Kindle uses Busybox-ash.
(Hint: Ash does not do arrays, but Bash does.)
So run Busybox-ash on your Mac when testing scripts for the Kindles.