AeonFelis@lemmy.worldtoLinux@lemmy.ml•How dare you use a text editor because it's easy to useEnglish
1·
17 days agoWhat if there is no correct answer?
What if there is no correct answer?
I just use this:
#!/bin/bash
keep_generating=1
while [[ $keep_generating == 1 ]]; do
dd if=/dev/random of=$1 bs=1 count=$2 status=none
echo Contents of $1 are:
cat $1
echo
read -p "Try generating again? " -s -n1 answer
while true; do
case $answer in
[Yy] )
echo
break
;;
[Nn] )
keep_generating=0
break
;;
*)
esac
read -s -n1 answer
done
done
You are assuming here that I know what I want. What if there is no obviously correct answer, and even in the Everett branch that generates the optimal content for the file I’ll still think it can be improved and tell it to destroy the universe?