#!/bin/bash for i in $(find | grep aaa | grep txt$); do sed -n '5p' $i done