daily pastebin goal


a guest Aug 12th, 2018 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #./bin/bash
  2. #arugment for subject
  3. math=$1
  4. #inputfile
  5. input=./math/questions.txt
  6. #enter firstname
  7. echo "Please Enter Your Firstname:"
  8. read -r firstname
  9. #enter lastname
  10. echo "Please Enter your Lastname:"
  11. read -r lastname
  12. #while loop
  13. while  read -r question <&3;
  14. do
  15. start=$SECONDS;
  16. read -r -p "$question " response;
  17. delay=$(( SECONDS - start ));
  18. echo "delay: $delay"
  19. echo "User typed answer '$response'"
  20. done 3<"$input" >>"${lastname}_${firstname}_$1.txt"
  21. #total time spent
  22. echo total time $delay seconds >>"summary.txt"
  23. #output wc
  24. wc -w "${lastname}_${firstname}_$1.txt" >>"summary.txt"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand