Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. #checks if speed is 150
  2. 157 if [[ $2 -eq 150 ]];
  3. 158 then
  4. 159 starttime=$SECONDS
  5. 160 FS=$'n'
  6. 161 for j in `grep --color=always -iP 'b[^aeious]*[aeiou][^aeious]*K[aeiou]' $1`;
  7. 162 do
  8. 163 #Reads the text file in the centre of the screen
  9. 164 echo " ___________________"
  10. 165 echo " $j";
  11. 166 echo " ___________________"
  12. 167 echo " Speed 150 wpm"
  13. 168 sleep 0.9;
  14. 169 clear;
  15. 170 done
  16. 171 endtime=$(($SECONDS - $starttime))
  17. 172 echo "You read $words_read words in $endtime seconds!"
  18. 173 exit 8
  19. 174 fi
  20.  
  21. #checks if speed is 150
  22. if [ $2 -eq 150 ] ; then
  23. words=0
  24. starttime=$(date +%s)
  25. FS=$'n'
  26. for j in $(grep --color=always -iP 'b[^aeious]*[aeiou][^aeious]*K[aeiou]' $1) ; do
  27. #Reads the text file in the centre of the screen
  28. echo " ___________________"
  29. echo " $j";
  30. echo " ___________________"
  31. echo " Speed 150 wpm"
  32. sleep 0.9
  33. clear
  34. words=$(( $words + 1 ))
  35. done
  36.  
  37. endtime=$(( $(date +%s) - $starttime ))
  38. echo "You read $words words in $endtime seconds!"
  39.  
  40. exit 8
  41. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement