Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chomper

Trim trailing newline and carriage return bytes from a file in-place.

Install

With Homebrew:

brew install jamylak/tap/chomper

With Nix:

nix profile install github:jamylak/chomper

From source with Cargo:

cargo install --path .

Usage

chomper <file>

Exit codes:

  • 0 success
  • 1 runtime error (IO, permissions)
  • 2 usage error

Examples

Trim a file with trailing newlines:

printf "hello\n\n" > sample.txt
chomper sample.txt

Expected output:

hello

About

Simple CLI to chomp newlines off the end of a file

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages