Skip to content

Instantly share code, notes, and snippets.

@bortzmeyer
Created February 20, 2019 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bortzmeyer/21091a5568294e55f3c0016f308ebfea to your computer and use it in GitHub Desktop.
Save bortzmeyer/21091a5568294e55f3c0016f308ebfea to your computer and use it in GitHub Desktop.
A simple script to post on the fediverse one file at random
!/bin/bash

set -e

DIR=/tmp/foobar
cd $DIR
FILES=$(ls *.txt)
set ${FILES}
shift $(($RANDOM % $#))
madonctl toot $(cat $1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment