Thursday, July 28, 2011

Friday, July 15, 2011

How to clear entries in a dictionary


Its simple:



Count your typing speed in Linux

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)
  1. start=date +%s note the current time.
  2. cat | wc -w (now start typing)
  3. do ctrl+d to stop typing
  4. stop=date +%s note the stop time.
  5. 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)