Skip to content

CLI utility for text processing up until a point

Notifications You must be signed in to change notification settings

mcastorina/heavi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heavi

heavi is a CLI utility to make text filtering up until a point easier. It is named after the Heaviside step function.

Use cases

  • print a file starting at a matched line
  • print a file until a matched line
  • print a file starting at a match
  • print a file until a match

Examples

$ seq 5 | heavi 3
4
5

$ seq 5 | heavi -v 3
1
2

Flags

Flag Description
-v Invert the Heaviside function; Output the file up until the match
-b Byte mode; Byte processing instead of line processing
-i Inclusive; Output the match in addition to other output