help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing arbitrary line range from files


From: lisa-asket
Subject: Printing arbitrary line range from files
Date: Mon, 28 Jun 2021 05:03:37 +0200 (CEST)

I want to print lines from files starting from line number "na" to line number 
"nb".



Have written the following function, which uses head, but now want to extend it 
to use

"sed" with "na" and "nb".



headrc ()
  {
    find "$2" \( -name \*.org -o -name \*.texi \)  \
      | xargs head -n "$1";
  }









reply via email to

[Prev in Thread] Current Thread [Next in Thread]