title: Is there a command in bash to get the first n words instead of n lines similar to 'head -n'?
body: <h2>I want to extract the first say 1M words from a large text file, can I do it in command line, instead of writing script?</h2>
  
  <p>Update: The data is one sentence per line, words are separated by white space, this structure should be preserved. I've done it with python with a word counter, just wondering whether it can be done with command line in a smarter way.</p>