#!/bin/bash # list the intersection of attributes # found in a set of arff files gawk ' BEGIN { IGNORECASE=1; OFS=","} FNR==1 { Files++ } /@attribute/ { Got[$2]++ } END { for(A in Got) if (Got[A]>=Files) print A }' $1