Basic Spelling Game With Bash & Aspell On Linux Mint Example
Page 1 of 1
Basic Spelling Game With Bash & Aspell On Linux Mint Example
- Code:
#!/bin/bash
#
clear
echo "Welcome to the Spelling Game"
aspell check file.txt
# now compare the md5 sum of file with compare file aka file.txt.bak answer file made on 1st use with new players to show if level complete!
#
# now
# Show Resaults!
#
echo ""
#
diff -q file.txt afile.txt 1>/dev/null
if [[ $? == "0" ]]
then
echo "Correct You Passed!"
# cleanup here!
cp file.txt.bak file.txt
else
echo "You Failed, Try Again!"
# cleanup here!
cp file.txt.bak file.txt
fi
#
# Another way would be to use md5sum to check size and that way you don’t have an answer file where cheating could take place
#
Level 2
Similar topics
» Bash Psychic Game For Linux Bash
» Linux Bash Who Am I Game Example
» Linux Mint 18.1 Bash Script For Web Devs
» Stock Market On Mint 18.2 Bash & Perl Example
» Psychic Number Guess Game With Bash For Linux
» Linux Bash Who Am I Game Example
» Linux Mint 18.1 Bash Script For Web Devs
» Stock Market On Mint 18.2 Bash & Perl Example
» Psychic Number Guess Game With Bash For Linux
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|