#!/bin/bash ### # Random LED script # Copyright (C) Thomas "ShALLaX" Pedley (gentoox@shallax.com) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ### while [ 1 == 1 ]; do export a="$((RANDOM % 4))" export b="$((RANDOM % 4))" export c="$((RANDOM % 4))" export d="$((RANDOM % 4))" if [ $a == "0" ]; then export a="r" fi if [ $a == "1" ]; then export a="o" fi if [ $a == "2" ]; then export a="g" fi if [ $a == "3" ]; then export a="x" fi if [ $b == "0" ]; then export b="r" fi if [ $b == "1" ]; then export b="o" fi if [ $b == "2" ]; then export b="g" fi if [ $b == "3" ]; then export b="x" fi if [ $c == "0" ]; then export c="r" fi if [ $c == "1" ]; then export c="o" fi if [ $c == "2" ]; then export c="g" fi if [ $c == "3" ]; then export c="x" fi if [ $d == "0" ]; then export d="r" fi if [ $d == "1" ]; then export d="o" fi if [ $d == "2" ]; then export d="g" fi if [ $d == "3" ]; then export d="x" fi /bin/led "$a$b$c$d" sleep 2 done