Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple bash script to randomly set a `launching.jpg` runcommand image. Place in `/opt/retropie/configs/all`. More info at
# 1.1
# (c) Jun 2020 Kelly Lawrence
# Set current directory to location of this bash script.
cd "$(dirname "$0")"
# Randomly rename all (*.jpg) image files in current directory.
for F in *.jpg ; do
sudo mv $F $RANDOM.jpg
# Get one random (*.jpg) image file.
ImageFile=$( find ./ -maxdepth 1 -name "*.jpg" | shuf -n 1 )
# Rename selected (*.jpg) image file to `launching.jpg`.
sudo mv $ImageFile launching.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment