I have a bash script that is reading quite a bit of data /dev/random. I need the user to type randomly to seed the random daemon. However once the script completes everything typed will get dumped to command input. Here's the code:
for i in ${users_thing[@]}
do
pass[${num}] = $(dd if=/dev/random status=noexfer bs=1 count=128 | base64) & #generate password
echo -n "Creating password: `expr $num + 1` of $sizes "
#tell what's going of
echo -en "\033[s"
while [[ $(jobs) != *Exit* ]] #while the program is still running
do
for j in ${spinny_thing[@]} #now spin
do
echo -en "\033[u\033[1D$j "
done
done
echo ""
num=`expr $num + 1`
done
So I would like to be able to dump the standard input without interrupting the foreground process so read is out because it pauses. Would it be possible to some how map it /dev/null?