Snippets

Dénes Türei Flashes random word from list for t seconds

Created by Dénes Türei
#!/bin/bash

# sm is the screen-message application
# http://www.joachim-breitner.de/projects#screen-message
# https://aur.archlinux.org/packages/screen-message/

readarray -t lines <<< "$(shuf hu-wordlist/freedict.utf8)"

len=${#lines[@]}
t=0.5

while true;
do
  i=$((1 + RANDOM % $len))
  sm ${lines[$i]} 2>/dev/null &
  sleep $t
  kill $!
done

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.