Does not function very well when I do
print-lines 5 8 .
print-lines ()
 {
   na=$1
   nb=$2
   dir=$3
   find "$dir" \( -name \*.org -o -name \*.texi \) \
     | xargs sed -n "$na,${nb}p"
 }
From: Greg Wooledge <greg@wooledge.org>
To: help-bash@gnu.org
Subject: Re: Printing arbitrary line range from files
Date: 28/06/2021 05:10:19 Europe/Paris
On Mon, Jun 28, 2021 at 05:03:37AM +0200, lisa-asket@perso.be wrote:
> I want to print lines from files starting from line number "na" to line
> number "nb".https://mywiki.wooledge.org/BashFAQ/011
> Have written the following function, which uses head, but now want to extend
> it to use
>
> "sed" with "na" and "nb".
sed -n "$na,${nb}p"
(Various alternatives and optimizations are possible. See the FAQ page.)