Tools
- bash shell (obvious)
- wc (Linux utility command, counts the number of words)
- cat (To get the user input)
- date +%s (time since 1970 in number of seconds elapsed)
- | (pipe to insert the output to the wc utility)
- start=date +%s note the current time.
- cat | wc -w (now start typing)
- do ctrl+d to stop typing
- stop=date +%s note the stop time.
- calculate:(cat | wc -w)*60/(stop-stop)
We get the typing speed per minute!
(Now its obvious that these command should be in the script)
(Now its obvious that these command should be in the script)
No comments:
Post a Comment