file * | fgrep text | cut -d: -f1 | while read FILE do echo "--------" echo "$FILE" echo "--------" head "$FILE"