rand_printable
291 Bytes
#!/bin/sh
function rand_printable() {
local ECHO="/bin/echo"
local TR="/usr/bin/tr"
local HEAD="/usr/bin/head"
${ECHO} -n "`</dev/urandom ${TR} -dc \ -\&\(-~ | ${HEAD} -c${1:-512}`"
}
test "X$(basename -- "$0")" = "Xrand_printable" && rand_printable "$@"
# vim: set ft=sh ts=4 sw=4: