Find all regular files under $dir directory tree with name pattern provided by the first positional parameter and show only the $num'th line from each of those files
find $dir -type f -name $1 -exec sed $num'q;d' {} \;