Skip to content

Instantly share code, notes, and snippets.

@niltonvasques
Created January 25, 2016 15:12
Show Gist options
  • Select an option

  • Save niltonvasques/a52a00966fcb8f886635 to your computer and use it in GitHub Desktop.

Select an option

Save niltonvasques/a52a00966fcb8f886635 to your computer and use it in GitHub Desktop.
Search and count a splited line in many files
for i in $(ls -d pfcm*); do echo -n "$i "; cat $i/discover.arff | grep "class " | cut -f2 -d{ | awk '{n=split($0,a,","); print n}'; done >> clusters_count.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment