Skip to content

Output middle lines of a file through terminal

Notifications You must be signed in to change notification settings

sanesource/middle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

middle

A helper on top of head and tail which outputs middle lines of a file.

Example:

Suppose we have to print line 4 to 8 from sample.txt file, where sample.txt file looks like:

line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9
line 10

We can use middle for it, as follows

Syntax: middle file start_line end_line

middle sample.txt 4 8

output

Installation

Download and install the script

curl -s https://raw.githubusercontent.com/sanesource/middle/main/middle > /usr/local/bin/middle && chmod 777 /usr/local/bin/middle 

Restart your terminal, and you're good to go!

Usage

usage

About

Output middle lines of a file through terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages