Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Random MOD player
#!/bin/bash
# Plays a random MOD file from https://modarchive.org
# Depends on XMP (http://xmp.sourceforge.net/)
rand=$(shuf -i 1-189573 -n 1)
tmp=$(mktemp /tmp/${rand}.XXXXXXXX.mod)
curl https://modarchive.org/jsplayer.php?moduleid=${rand} > ${tmp}
xmp ${tmp}
rm ${tmp}
@ptanmay143

This comment has been minimized.

Copy link

ptanmay143 commented Jul 7, 2020

I saw your post on Reddit. You might want to hide the curl download progress bar. Here's a link that'll probably help. (https://stackoverflow.com/questions/7373752/how-do-i-get-curl-to-not-show-the-progress-bar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.