Unique values from specific column in set of files

Possibly handy piping of commands…

cut -d" " -f7 D*.txt|sort|uniq>gates.txt


  1. takes all files matching “D*.txt”
  2. cut -d” ” -f7   gets the 7th column, using the space character as a delimiter
  3. sorts the values ascending
  4. gets all unique values
  5. pipes into output file gates.txt


Leave a Comment

Your email address will not be published.