Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    head -n 10 will give you the first 10 lines of a file; that may help you solve the extra piece Commented Jan 16, 2016 at 20:24
  • But what about if let's say i need to print the words that have more than x apperances ? Commented Jan 16, 2016 at 21:55
  • If you've sorted and uniq -c'd, then one way would be to use awk to ask if field 2 is greater than X Commented Jan 16, 2016 at 22:48
  • @JeffSchaller ok , but if X is a parameter given as an input? Commented Jan 16, 2016 at 23:04
  • Search this site for ways that people pass variables into awk. Look for -v Commented Jan 16, 2016 at 23:10