[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Printing arbitrary line range from files
From: |
Greg Wooledge |
Subject: |
Re: Printing arbitrary line range from files |
Date: |
Sun, 27 Jun 2021 23:10:19 -0400 |
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.)
- Printing arbitrary line range from files, lisa-asket, 2021/06/27
- Re: Printing arbitrary line range from files,
Greg Wooledge <=
- Printing arbitrary line range from files, lisa-asket, 2021/06/27
- Re: Printing arbitrary line range from files, Lawrence Velázquez, 2021/06/28
- Re: Printing arbitrary line range from files, Seth David Schoen, 2021/06/28
- Printing arbitrary line range from files, lisa-asket, 2021/06/28
- Re: Printing arbitrary line range from files, Greg Wooledge, 2021/06/28
- Printing arbitrary line range from files, lisa-asket, 2021/06/28
- Re: Printing arbitrary line range from files, Greg Wooledge, 2021/06/28
- Printing arbitrary line range from files, lisa-asket, 2021/06/28
- Re: Printing arbitrary line range from files, Greg Wooledge, 2021/06/28
- Re: Printing arbitrary line range from files, Dennis Williamson, 2021/06/28