The Anthropo Program 1.1

A first shot at putting this together.  This is the modified code.  It works on a file called anthropo_facts.txt in a subdirectory anthropo.  It also needs some of the standard files that I have used in the past (in a cprog folder).

The text file first based on Robin McKie’s “Dawn of Man” with a few ideas introduced by me. Version 1.0

01c: ANSWER: Laetoli QUESTION: The 54 _________ footprints made in volcanic ash about 3.5 million years ago, suggest that some hominids were already bipedal at that time.
02c: ANSWER: Teeth QUESTION: ________ are the most abundant fossils found at archeological sites.
03c: ANSWER: Sadiman QUESTION: In addition to the tracks of hares, guinea fowl, elephant, giraffe, saber-tooth cat, hipparion, and chalicothere, a few of the 54 hominid footprints recovered in the ________ volcano carbonatite ash had prints in which a heel, arch, big toe, and ball could be distinguished.
04c: ANSWER: Australopithecus afarensis QUESTION: Several ____________  ___________ fossils have been found in sediment beds around the footprints discovered by Mary Leakey.  Although she refuses to assign a species to the track makers, many paleontologists use this fossil evidence to assign the footprint makers to this species.
05c: ANSWER: larger QUESTION: There are 2 sets of footprints in the volcanic ash – one larger, the other smaller.  The ______ set is blurred leading Leakey to postulate that, in addition to a man and a woman, there may have been a 3rd person walking in the footprints of another.  A second possibility might be, an older and younger adult made the prints with the footprints made by the heavier weight causing the mud to give more.
06c: ANSWER: bipedalism QUESTION: No stone tools have ever been found in any Australopithecus afarensis site leading researchers to conclude that __________ evolved before tool-making.
07c: ANSWER: Australopithecus anamensis QUESTION: A complete lower jaw and fragments of a tibia found by Meave Leakey at Kanapoi in northern Kenya were attributed to another species called ___________ _____________ because the mandible was narrow in the back like a modern chimp’s jaw, and the knee and ankle joints suggest an upright stance even 4.2 million years ago.
08c: ANSWER: woodland QUESTION: The discovery of seeds and bones of forest monkeys and antelope in the same sediments as the hominid bones at Allia Bay suggest that Australopithecus anamensis still inhabited closed-canopy ______________ at least part of the time.
09c: ANSWER: Rift QUESTION: Lake Turkana, fed by the Omo River lies at the heart of the ____ valley where tectonic activity has uplifted ancient sediments, exposing to erosion the soils in which early hominids’ bones were fossilized.
10c: ANSWER: Lucy QUESTION: A 3.2 million year old 47 bone 40% complete skeleton of Australopithecus afarensis discovered by Johanson and Gray near the River Awash of Ethiopia’s Afar Triangle is called ________.  Although her leg bones suggest she was only 3.4-4 ft tall, she had already cut her wisdom teeth, and bone ridges suggest arthritis.
11c: ANSWER: dimorphism QUESTION: The 3.2 million year old 200 bone remains of nine adults and four Australopithecus afarensis children discovered by Michael Bush at Afar Locality 333 in Ethiopia display __________ (large 163 lb males and small 66 lb females) suggesting a nonhuman nonmonogamous social structure more similar to the harems seen in gorillas. This find was called the first family, who all appeared to have been quickly entombed in a singular event, there bones showing no signs of weathering or carnivore marks.
12c: ANSWER: foramen magnum QUESTION: The location of the __________ ________ relatively toward the center vs. the base of the skull in the single 4.4 million year old (oldest) teeth, bits of skull, arm bones, and partial skeleton of Australopithecus ramidus found by Tim White in Ethiopia, suggests bipedalism.
13c: ANSWER: Proconsul QUESTION: A ______________ skeleton, dated to 18 million years ago and considered a candidate to be a possible early ancestor of both apes and man, was discovered in 1948 on Rusinga Island in Lake Victoria, Kenya by Mary Leakey.
14c: ANSWER: 98 QUESTION: Humans share ____ percent of their DNA with chimpsnzees.
15c: ANSWER: gorillas QUESTION: In assigning an evolutionary tree using blood and DNA evidence, some scientists believe that ___________ diverged from a common line 7 million years ago, and then split into two lines – one that led to modern humans, the other that led to pygmy and common chimpanzees 5-6 million years ago.
16c: ANSWER: third QUESTION: An ape brain is about one _______ the size of a human brain (1200-1600 cc).
17c: ANSWER: chimpanzees QUESTION: Although human beings are the only species that is habitually bipedal, ________ and gibbons can also stand upright and walk occasionally.
18c: ANSWER: less QUESTION: The fact that upright beings can form a straight leg, locking and not bent at the knee, means that ____ leg strength is required to stand upright.
19c: ANSWER: femur QUESTION: An angled ______ allows both humans and australopithecines to support themselves directly beneath their bodies, as opposed to having to waddle from side to side like apes.
20c: ANSWER: 2 QUESTION: The 5 million year old evolutionary tree commonly proposed by many scientists is derived from bones unearthed and dated in the past 100 years from about _____ thousand individuals, as well as DNA evidence.
21c: ANSWER: extinction QUESTION: Stephen Gould is quoted as saying that “Life is a copiously branching bush continually pruned by the grim reaper of ___________, not a ladder of predictable progress.”
22c: ANSWER: Olduvai Gorge QUESTION: The _________ ________ is a 30 mile gash cut through the Serengeti plains of Tanzania when the main water course changed direction 500 000 years ago.  1.9 million year old sediment beds contain tools made of lava from only 1 mile away.  Tools dated from later sediment beds reveal complex tool trading routes from other areas.
23c: ANSWER: South Africa QUESTION: To date, all of the major australopithecine fossil finds have occurred in Ethiopia, Kenya, Tanzania, and _______ _________.
24c: ANSWER: Piltdown QUESTION: The ________ Man was a hoax created from a human cranium and an orangutan jaw said to have been discovered in Sussex, England in 1913.  Some scientists cited it as proof that the human brain had evolved before humans became carnivores or bipedal.  It fooled scientists for over 40 years until fluorine analysis by a dentist confirmed its modern origin.
25c: ANSWER: Taung QUESTION: The _________ child is a 6 year old Australopithecus Africanus skull with molars that had just started to erupt.  It was found in the limestone Makapangsat caves of South Africa.  Given to Raymond Dart in 1924, it was responsible for the first use of the term Australopithecus, and also used to argue against the then predominant belief that human ancestors came from asia.
26c: ANSWER: Australopithecus africanus QUESTION: Fossil records for ________ __________ disappear around 2.4 million years ago.
27c: ANSWER: Australopithecus robustus QUESTION: _________ _________ discovered by Broom at age 70 at Kromdraai and Swartkrans in South Africa, was one of several specimens that Broom in fact gave different names to.  They were slightly larger than africanus, bipedal but less dimorphic, and had flat molars that probably chewed a lot of roots, shoots, and vegetables.
28c: ANSWER: Broom QUESTION: _________ provided the first evidence that multiple species of hominids coexisted in Africa 2 million years ago – and therefore that not every hominid fossil was likely to be a progenitor of Homo sapiens.
29c: ANSWER: eagle QUESTION: The Taung child has an indentation in its skull that some scientists believe was made by an _______.  Other indentations on Australopithecus skulls have been attributed to leopard tooth marks.
30c: ANSWER: boisei QUESTION: Australopithecus _______, discovered by Mary Leakey in 1959 in Kenya surrounded by Oldawan tools, is remarkably similar to Australopithecus robustus, likely having the same ecological niche, and expiring at the same time 1 million years ago.  Both species had brains the same size as Australopithecus Afarensis, but larger faces, jaws and teeth.
31c: ANSWER: rudolfensis QUESTION: A site at East Turkana in Kenya was found by Richard Leakey to have fossil skulls from 3 different species: Australopithecus boisei, Homo erectus, and Homo _____________.  Although they may not have lived together, they all likely used the same site (and resources).
32c: ANSWER: habilis QUESTION: Because the first skeletal remains (found by Johanson and White in the Olduvai Gorge) that included both an arm and a leg from the same specimen (heavily splintered) were found to have arms longer than legs when reconstructed, some scientist now refer replace Homo with Australopithecus in the ________ species.
33c: ANSWER: rudolfensis QUESTION: Some scientists believe that some bones from Homo habilis should actually be attributed to Homo ________.
34c: ANSWER: habilis QUESTION: Homo _______ is the oldest species to arguably be assigned to the Homo line.
35c: ANSWER: Zinjanthropus QUESTION: 3 young hominid fossils with large crania and some ambiguous evidence of a crude campsite and tools uncovered in the Oldowan gorge caused Leakey to abandon his claim that the heavy saggital-crested ___________ boisei was a tool-maker, assigning the name Homo habilis to the skulls instead, and relegating boisei to Australopithecus.

—————————————————————————————————————————————–

The Anthropo 1.1 program:

#!/bin/bash
# anthropo.sh v.1.1 a program submitted by livedoggb on 7/06/2014
# dependencies compiled random1.c, intdiv2float.c, in a subdirectory called for_kids/c_progs
# needs anthropo_facts.txt file with questions and answers in a subdirectory called anthropo
# It also outputs a file sommaire.out that has the statistics of your session.
dir_path=”/mnt/sdb1/”
dir_txt_path=$( echo $dir_path/anthropo/ )
#pic_dir_path=$( echo $dir_txt_path/botany_Houston_pics )
#mus_dir_path=$( echo $dir_txt_path/botany_Houston_mus )
cprog_path=$( echo $dir_path/for_kids/c_progs )
temp_path=$( echo /root/ )
if [ -e $temp_path/sommaire.out ]
then
rm $temp_path/sommaire.out
fi
#if [ -n $temp_path/botany_own_pics ]
#then
#mkdir $temp_path/botany_own_pics
#fi
#if [ -n $temp_path/botany_own_mus ]
#then
#mkdir $temp_path/botany_own_mus
#fi
function set_path {
echo
#echo “1.  Use Houston pictures and Verdi’s 4 Seasons.”
#echo “2.  Use your own pictures and music moved to the root directory in a”
#echo ”    subdirectory called botany_own_pics and botany_own_music.”
echo
#echo “Please choose an option.”
pic_set=2
case $pic_set in
1)
pic_dir_path=$( echo $dir_txt_path/botany_Houston_pics )
mus_dir_path=$( echo $mus_dir_path)
;;
2)
pic_dir_path=$( echo $temp_path/botany_own_pics )
mus_dir_path=$( echo $temp_path/botany_own_mus )
;;
esac
return
}

function trim_line {
i=1
echo
#num_words=$(gawk ‘{ sum += $1 }; END { print sum }’ testline.out)
words_left=”c”
while [ “$words_left” != “” ]
do
j=$(( $i + 7 ))
words_left=$( echo $line | cut -d’ ‘ -f$i-$j )
echo $words_left
i=$(( $j + 1 ))
done
return
}

function echo_in_color_br_sentence {
part1=$( echo $testline | sed “s/\(.*_\)_*_\(_.*\)/\1/” )
part2=$( echo $testline | sed “s/\(.*_\)_*_\(_.*\)/$echo_verb/” )
part3=$( echo $testline | sed “s/\(.*_\)_*_\(_.*\)/\2/” )
#”blue”
echo -n -e ‘\E[47;34m'”33[1m$part133[0m”
#”red”
echo -n -e ‘\E[47;31m'”33[1m$part233[0m”
#”blue”
echo -e ‘\E[47;34m'”33[1m$part333[0m”
tput sgr0
return
}

#rm $dir_path/hyper-tense-files_used.out
sum_fautes=0
echo “Please wait for a few minutes while the system sets up the music database.”
if [ -e $dir_path/hyper-tense-flowers-time2.out ]
then
echo “The program has found a time file.”
echo “1. Use this file.”
echo “2. Make a new time file. Choose 2 if you have changed the music.”
echo “Please choose:  (If you aren´t sure, choose 2.  The default is 2.)”
read choice
else
choice=2
fi
if [ -e $choice ]
then
choice=”2″
fi
echo “The best way to end the program in slideshow mode is to press the ESC key.”
echo
case “$choice” in
1)
echo “Using the old file.”
;;
2)
echo “Making another file.  This will take a few minutes.  Please be patient.”
echo
echo
echo “0” > $temp_path/hyper-tense-flowers-time2.out
if [ -n “$mus_dir_path/*.*” ]
then
echo “A link to your music does not exist in the root file system.  Please fix this.”
else
mplayer -msglevel all=-1 -profile gnome-mplayer -ss 10 -endpos 1 -volume 0 $mus_dir_path/*.* | tee $temp_dir/temp.out | grep “^A: ” | sed -e ‘s/^A: .* of \([0-9]*\).* .*/\1/g’ >> $temp_path/hyper-tense-flowers-time2.out
fi
;;
esac
time_array=($(cat $temp_path/hyper-tense-flowers-time2.out))
i=1
num_files=$(expr $(grep -c . $temp_path/hyper-tense-flowers-time2.out))

i=0
while [ $i -lt $num_files ]
do
echo “$i. ${time_array[$i]}”
i=$(( $i + 1 ))
done
num_files=$(( $num_files – 1 ))
echo “num_files=” $num_files
echo
echo “Quiz”
echo
echo  “Press Enter to begin.”
echo
choice=3
#echo  “With quotes? Choose y or n.  Default is n.”
#read with_quotes
#echo “Oral reading? Choose y or n. Default is n.”
#read read_aloud
#echo “With pictures? Choose y or n. Default is y.”
#read show_pics
#echo “With music? Choose y or n. Default is y.”
#read with_music
with_quotes=”n”
read_aloud=”n”
show_pics=”n”
with_music=”n”
more_local_info=”n”
if [ -e $read_aloud ]
then
read_aloud=”n”
fi
if [ -e $with_quotes ]
then
with_quotes=”n”
fi
if [ -e $show_pics ]
then
show_pics=”y”
fi
if [ -e $with_music ]
then
with_music=”y”
fi
case “$choice” in
1)
echo “Slideshow mode.”
set_path
#viewnior –slideshow $pic_dir_path/01\ *.jpg < /dev/null &
mplayer -msglevel all=-1 -profile gnome-mplayer -volume 200 “$mus_dir_path”/*.*
;;
2)
echo “Instruction mode.”
set_path
#echo “All information derives from anthropo_facts.txt in the folder anthropo.”
c=””
right=0
asked=0
rightverbs=””
wrongverbs=””
average=0
verb_guess=””
#num_vfiles=$(expr $(ls -1  $pic_dir_path/*.jpg | grep -c . ))
echo “num_vfiles=” $num_vfiles
hours_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\1/”| sed “s/0\([0-9]\)/\1/” )
min_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\2/”| sed “s/0\([0-9]\)/\1/” )
sec_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\3/”| sed “s/0\([0-9]\)/\1/” )

while [ -e $c ]
do
if [ -e $dir_txt_path/anthropo_facts.txt ]
then
maxlinenum=$( grep -c . $dir_txt_path/anthropo_facts.txt)
#maxlinenum=$(( $maxlinenum – 1  ))
quizfact=$( $cprog_path/random1 1 $maxlinenum)
correctquizfact=$( echo “$quizfact”c)
omit_line=$( grep “^$correctquizfact:” $dir_txt_path/anthropo_facts.txt)
#      echo “random quiz line is:” $quizfact $correctquizfact
if [ “$omit_line” != “” ]
then
#echo “The verb is: ” $verb
echo “Random quiz line is:” $quizfact

testline=$( grep “^$correctquizfact:” $dir_txt_path/anthropo_facts.txt | sed -e “s/^.*QUESTION:\(.*\)/\1/” )
line=$testline
echo_verb=$( grep “^$correctquizfact:” $dir_txt_path/anthroppo_facts.txt | sed -e “s/^.*ANSWER:\(.*\) QUESTION:.*/\1/” )
echo_in_color_br_sentence

asked=$(( $asked + 1 ))
echo “Press enter to continue (enter e to exit):”
read verb_guess
if [ “$verb_guess” == “e” ]
then
break
fi
verb_guess=$echo_verb
if [ “$verb_guess” == “$echo_verb” ]
then
echo “Correct.”
right=$(( $right + 1 ))
average=$(( $right/$asked ))
rightverbs=$( echo $rightverbs, $echo_verb)
if [ $show_pics == “y” ]
then
random_verb_num=$( $cprog_path/random1 1 $num_vfiles)
fn=$random_verb_num
#fn=1
#echo “random_pic_num is:” $random_verb_num
#verb=$(ls $pic_dir_path/$fn\ *.jpg | sed “s/^.*$fn \(.*\).jpg/\1/” )
#echo $verb
mypid=$$
#viewnior $pic_dir_path/$fn\ *.jpg < /dev/null &
cpid=$!
if [ $more_local_info == “y” ]
then
random_verb_num=$( $cprog_path/random1 1 5)
echo “random verb num is ” $random_verb_num
fn=$random_verb_num
if [ -e $dir_txt_path/local_flora_facts/$fn\ *.txt ]
then
num_facts=$( grep -c . $dir_txt_path/local_flora_facts/$fn\ *.txt )
echo “I am in this loop.” $num_facts
num_facts=$(( $num_facts – 1 ))
picked_fact=$( $cprog_path/random1 1 $num_facts )
correctquote=$( echo “$picked_fact”c )
dfact=$( grep “^$correctquote:” $dir_txt_path/local_flora_facts/$fn\ *.txt | sed “s/^.*c://” )
xmessage -timeout 30 $dfact < /dev/null &
fi
fi
fi
if [ $with_music == “y” ]
then
num_mus=$( $cprog_path/random1 1 $num_files )
num_mus_fixed=$(echo $num_mus | sed -e “s/^0//”)
prob_time=$(( ${time_array[$num_mus_fixed]} – 20 ))
ssx=($(expr $($cprog_path/random1 0 $prob_time)))

mplayer -msglevel all=-1 -profile gnome-mplayer -ss $ssx -endpos 30 -volume 200 “$mus_dir_path”/$num_mus*.*
fi
#                  kill -s SIGTERM $cpid
if [ $with_quotes == “y” ]
then
num_quotes=$( grep -c . $dir_txt_path/environmental_quotes.txt )
picked_quote=$( $cprog_path/random1 1 $num_quotes )
correctquote=$( echo “$picked_quote”c )
dquote=$( grep “^$correctquote:” $dir_txt_path/environmental_quotes.txt | sed “s/^.*c://”)
xmessage -timeout 30 $dquote < /dev/null &
fi
else
echo “No.  The correct answer is:” $echo_verb
wrongverbs=$( echo $wrongverbs, $echo_verb )
fi
if [ $read_aloud == “y” ]
then
repeat=”y”
if [ -e /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/aaenglish\ highlit/$verb$quizfact.* ]
then
while [ $repeat == “y” ]
do
mplayer -volume 80 /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/aaenglish\ highlit/$verb$quizfact.*
echo “Write the sentences that you heard on paper.  Repeat? (y or n. The default is n.)”
read repeat
if [ -e $repeat]
then
repeat=”n”
fi

done
echo
#$shighlit=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.* SHIGHLIT:\(.*\)TRANSSHIGHLIT:.*/\1/”)
#$echo $shighlit
#$echo
#$echo “Count the number of mistakes in what you wrote. One point for every word.”
#$echo How many errors?
#$read fault_number
if [ -e $fault_number ]
then
fault_number=0
fi
sum_faults=$(( $sum_faults + $fault_number ))
fi
fi
#$trans_sent=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.*ETSENT1:\(.*\)ETSENT2:.*/\1/”)
#
echo
#$shighlit=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.* SHIGHLIT:\(.*\)TRANSSHIGHLIT:.*/\1/”)
#$echo $shighlit
#echo
#echo “Please finish by reading the above sentence out loud.”
#read
echo “The line number is:” $quizfact
#echo $testline | sed “s/.*(\(.*\)).*/\1/”
#                echo $testline | sed “s/\(.*[ |^]_\)_*_\(_.*\)/\1$echo_verb\2/”
#                echo $testline | sed “s/\(.*_\)_*_\(_.*\)/\1$echo_verb\2/”
#                echo_in_color_br_sentence
#echo $trans_sent
aver_right=$( $dir_path/intdiv2float $right $asked | sed -e “s/\([0-9]*\…\).*/\1/” )
echo $right “/” $asked ” correct.  Batting average:” $aver_right “Dictation errors: ” $sum_faults
echo “Please wait…I’m looking for another question…”
fi
fi
done
hours_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\1/”| sed “s/0\([0-9]\)/\1/” )
min_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\2/”| sed “s/0\([0-9]\)/\1/” )
sec_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\3/”| sed “s/0\([0-9]\)/\1/” )
hours_diff=$(( $hours_end – $hours_bgn ))
min_diff=$(( $min_end – $min_bgn ))
sec_diff=$(( $sec_end – $sec_bgn ))
midnight=12
if [ $hours_diff -lt 0 ]
then
hours_diff=$(( $(( $midnight – $hours_bgn )) + $hours_end ))
# fix hour change if it happens at midnight or noon,
fi
time_of_ans=$(( $hours_diff * 60 + $min_diff ))
aver_time=$( $dir_path/intdiv2float $time_of_ans $((asked – 1)) | sed -e “s/\([0-9]*\…\).*/\1/” )

echo “You worked ” $time_of_ans “minutes for an average of: ” $aver_time “minutes per question, and a sum of ” $(($asked – 1)) “questions.” | tee >>$temp_path/sommaire.out
echo “The correct answers (” $right “):” $rightverbs  | tee >>$temp_path/sommaire.out
wrong=$(( $asked – $right – 1 ))
echo “The incorrect answers (” $wrong “):” $wrongverbs | tee >>$temp_path/sommaire.out
num_entries=$(grep “^[0-9]*c:” $dir_txt_path/*.txt | grep -c .)
echo “The database had ” $num_entries “entries.” | tee >>$temp_path/sommaire.out
echo “Your percentage: ” $aver_right | tee >>$temp_path/sommaire.out
cat $temp_path/sommaire.out
echo “Life is a tree. You are a meristem.  How would you like to differentiate from here?”
echo “Choices are:”
echo “1. Painting a picture of a flower.”
echo “2. Yoga or prayer activity.”
echo “3. Nature walk with dogs and camera.”
echo “4. Gardening activity.”
echo “5. Relaxation or sleep.”
echo
echo “Enter a number, or enter R to have the computer randomly choose an activity.”
read choice
if [ $choice == “R” ]
then
comp_choice=$( $cprog_path/random1 1 5 )
echo “You won the lottery! The random choice was: $comp_choice.  Enjoy your activity!”
#fi
else
echo “You chose $choice.  Enjoy your activity.”
fi
;;
3)
echo “Quiz mode.”
set_path
echo “All information derives from anthropo_facts.txt in the folder anthropo.”
c=””
right=0
asked=0
rightverbs=””
wrongverbs=””
average=0
verb_guess=””
#num_vfiles=$(expr $(ls -1  $pic_dir_path/*.jpg | grep -c . ))
echo “num_vfiles=” $num_vfiles
hours_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\1/”| sed “s/0\([0-9]\)/\1/” )
min_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\2/”| sed “s/0\([0-9]\)/\1/” )
sec_bgn=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\3/”| sed “s/0\([0-9]\)/\1/” )

while [ -e $c ]
do
if [ -e $dir_txt_path/anthropo_facts.txt ]
then
maxlinenum=$( grep -c . $dir_txt_path/anthropo_facts.txt)
#maxlinenum=$(( $maxlinenum – 1  ))
quizfact=$( $cprog_path/random1 1 $maxlinenum)
correctquizfact=$( echo “$quizfact”c)
omit_line=$( grep “^$correctquizfact:” $dir_txt_path/anthropo_facts.txt)
#      echo “random quiz line is:” $quizfact $correctquizfact
if [ “$omit_line” != “” ]
then
#echo “The verb is: ” $verb
echo “Random quiz line is:” $quizfact

testline=$( grep “^$correctquizfact:” $dir_txt_path/anthropo_facts.txt | sed -e “s/^.*QUESTION:\(.*\)/\1/” )
line=$testline
trim_line
verb_guess=””
asked=$(( $asked + 1 ))
while [ -e $verb_guess ]
do
echo “Enter your answer (enter e to exit):”
read verb_guess
done
if [ “$verb_guess” == “e” ]
then
break
fi
echo_verb=$( grep “^$correctquizfact:” $dir_txt_path/anthropo_facts.txt | sed -e “s/^.*ANSWER: \(.*\) QUESTION:.*/\1/” )
if [ “$verb_guess” == “$echo_verb” ]
then
echo “Correct.”
right=$(( $right + 1 ))
average=$(( $right/$asked ))
rightverbs=$( echo $rightverbs, $echo_verb)
if [ $show_pics == “y” ]
then
random_verb_num=$( $cprog_path/random1 1 $num_vfiles)
fn=$random_verb_num
#fn=1
echo “random_pic_num is:” $random_verb_num
#verb=$(ls $pic_dir_path/$fn\ *.jpg | sed “s/^.*$fn \(.*\).jpg/\1/” )
#echo $verb
mypid=$$
#viewnior $pic_dir_path/$fn\ *.jpg < /dev/null &
cpid=$!
if [ $more_local_info == “y” ]
then
random_verb_num=$( $cprog_path/random1 1 5)
echo “random verb num is ” $random_verb_num
fn=$random_verb_num
if [ -e $dir_txt_path/local_flora_facts/$fn\ *.txt ]
then
num_facts=$( grep -c . $dir_txt_path/local_flora_facts/$fn\ *.txt )
echo “I am in this loop.” $num_facts
num_facts=$(( $num_facts – 1 ))
picked_fact=$( $cprog_path/random1 1 $num_facts )
correctquote=$( echo “$picked_fact”c )
dfact=$( grep “^$correctquote:” $dir_txt_path/local_flora_facts/$fn\ *.txt | sed “s/^.*c://” )
xmessage -timeout 30 $dfact < /dev/null &
fi
fi
fi
if [ $with_music == “y” ]
then
num_mus=$( $cprog_path/random1 1 $num_files )
num_mus_fixed=$(echo $num_mus | sed -e “s/^0//”)
prob_time=$(( ${time_array[$num_mus_fixed]} – 20 ))
ssx=($(expr $($cprog_path/random1 0 $prob_time)))

mplayer -msglevel all=-1 -profile gnome-mplayer -ss $ssx -endpos 30 -volume 200 “$mus_dir_path”/$num_mus*.*
fi
#                        kill -s SIGTERM $cpid
if [ $with_quotes == “y” ]
then
num_quotes=$( grep -c . $dir_txt_path/environmental_quotes.txt )
picked_quote=$( $cprog_path/random1 1 $num_quotes )
correctquote=$( echo “$picked_quote”c )
dquote=$( grep “^$correctquote:” $dir_txt_path/environmental_quotes.txt | sed “s/^.*c://”)
xmessage -timeout 30 $dquote < /dev/null &
fi
else
echo “No.  The correct answer is:” $echo_verb
wrongverbs=$( echo $wrongverbs, $echo_verb )
fi
if [ $read_aloud == “y” ]
then
repeat=”y”
if [ -e /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/aaenglish\ highlit/$verb$quizfact.* ]
then
while [ $repeat == “y” ]
do
mplayer -volume 80 /mnt/sda1/Documents\ and\ Settings/TEMP/My\ Documents/My\ Music/aaenglish\ highlit/$verb$quizfact.*
echo “Write the sentences that you heard on paper.  Repeat? (y or n. The default is n.)”
read repeat
if [ -e $repeat]
then
repeat=”n”
fi

done
echo
#$shighlit=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.* SHIGHLIT:\(.*\)TRANSSHIGHLIT:.*/\1/”)
#$echo $shighlit
#$echo
#$echo “Count the number of mistakes in what you wrote. One point for every word.”
#$echo How many errors?
#$read fault_number
if [ -e $fault_number ]
then
fault_number=0
fi
sum_faults=$(( $sum_faults + $fault_number ))
fi
fi
#$trans_sent=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.*ETSENT1:\(.*\)ETSENT2:.*/\1/”)
#
echo
#$shighlit=$(grep “^$correctquizfact:” $dir_txt_path/$fn*.txt | sed -e “s/^.* SHIGHLIT:\(.*\)TRANSSHIGHLIT:.*/\1/”)
#$echo $shighlit
#echo
#echo “Please finish by reading the above sentence out loud.”
#read
echo “The line number is:” $quizfact
#echo $testline | sed “s/.*(\(.*\)).*/\1/”
#                echo $testline | sed “s/\(.*[ |^]_\)_*_\(_.*\)/\1$echo_verb\2/”
#                echo $testline | sed “s/\(.*_\)_*_\(_.*\)/\1$echo_verb\2/”
echo_in_color_br_sentence
#echo $trans_sent
aver_right=$( $cprog_path/intdiv2float $right $asked | sed -e “s/\([0-9]*\…\).*/\1/” )
echo $right “/” $asked ” correct.  Batting average:” $aver_right “Dictation errors: ” $sum_faults
echo “Please wait…I’m looking for another question…”
fi
fi
done
hours_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\1/”| sed “s/0\([0-9]\)/\1/” )
min_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\2/”| sed “s/0\([0-9]\)/\1/” )
sec_end=$( date| sed “s/.* \(..\):\(..\):\(..\).*/\3/”| sed “s/0\([0-9]\)/\1/” )
hours_diff=$(( $hours_end – $hours_bgn ))
min_diff=$(( $min_end – $min_bgn ))
sec_diff=$(( $sec_end – $sec_bgn ))
midnight=12
if [ $hours_diff -lt 0 ]
then
hours_diff=$(( $(( $midnight – $hours_bgn )) + $hours_end ))
# fix hour change if it happens at midnight or noon,
fi
time_of_ans=$(( $hours_diff * 60 + $min_diff ))
aver_time=$( $cprog_path/intdiv2float $time_of_ans $((asked – 1)) | sed -e “s/\([0-9]*\…\).*/\1/” )

echo “You worked ” $time_of_ans “minutes for an average of: ” $aver_time “minutes per question, and a sum of ” $(($asked – 1)) “questions.” | tee >>$temp_path/sommaire.out
echo “The correct answers (” $right “):” $rightverbs  | tee >>$temp_path/sommaire.out
wrong=$(( $asked – $right – 1 ))
echo “The incorrect answers (” $wrong “):” $wrongverbs | tee >>$temp_path/sommaire.out
num_entries=$(grep “^[0-9]*c:” $dir_txt_path/*.txt | grep -c .)
echo “The database had ” $num_entries “entries.” | tee >>$temp_path/sommaire.out
echo “Your percentage: ” $aver_right | tee >>$temp_path/sommaire.out
cat $temp_path/sommaire.out
;;
esac

————————————————————————————————————————————————-:

The first bench:

You worked  18 minutes for an average of:  0.180000 minutes per question, and a sum of  100 questions.
The correct answers ( 90 ): , 98, rudolfensis, gorillas, bipedalism, Zinjanthropus, rudolfensis, femur, Zinjanthropus, bipedalism, Taung, foramen magnum, Zinjanthropus, 98, femur, Piltdown, foramen magnum, habilis, Zinjanthropus, Proconsul, gorillas, Proconsul, eagle, Piltdown, habilis, 2, boisei, habilis, dimorphism, bipedalism, Proconsul, larger, habilis, Teeth, boisei, Australopithecus robustus, Australopithecus anamensis, rudolfensis, 2, South Africa, femur, femur, Piltdown, dimorphism, Proconsul, Australopithecus africanus, Australopithecus robustus, Lucy, 98, Lucy, 2, foramen magnum, Proconsul, eagle, 2, habilis, eagle, South Africa, 2, Australopithecus robustus, femur, rudolfensis, Australopithecus robustus, Broom, Piltdown, extinction, woodland, 2, 98, gorillas, Proconsul, habilis, less, habilis, chimpanzees, 98, Olduvai Gorge, rudolfensis, bipedalism, larger, 2, Lucy, Taung, larger, habilis, bipedalism, gorillas, Australopithecus anamensis, Broom, Proconsul, Lucy
The incorrect answers ( 10 ): , Australopithecus robustus, Laetoli, Australopithecus anamensis, Australopithecus robustus, Australopithecus anamensis, Olduvai Gorge, rudolfensis, Australopithecus anamensis, Laetoli, Sadiman
The database had  35 entries.
Your percentage:  0.900000

 

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s