howtos:random_generator
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:random_generator [12/01/2007 23:33] – domingo | howtos:random_generator [02/12/2018 21:34] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Random Generator ====== | ||
+ | |||
+ | Simple little script, based on Zenity, that delivers a random string through a GUI. | ||
+ | As Zenity is GTK+ based it works best in Gnome. | ||
+ | < | ||
+ | #!/bin/sh | ||
+ | |||
+ | $(zenity --title=" | ||
+ | if [ $? -eq 0 ] | ||
+ | then | ||
+ | LENGTH=`zenity --title=" | ||
+ | RANDOM=`head -c 45 /dev/random | uuencode - | head -n 2 | tail -n 1 | cut -c -$LENGTH` | ||
+ | zenity --title=" | ||
+ | exit 0 | ||
+ | else | ||
+ | LENGTH=`zenity --title=" | ||
+ | RANDOM=`head -c 45 /dev/random | uuencode -m - | tail -n 2 | head -n 1 | cut -c -$LENGTH` | ||
+ | zenity --title=" | ||
+ | exit 0 | ||
+ | fi | ||
+ | fi | ||
+ | </ |
howtos/random_generator.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1