nln

Crates.ionln
lib.rsnln
version1.0.1
created_at2025-11-06 11:45:58.878628+00
updated_at2025-11-07 22:41:31.468487+00
descriptionRemove trailing newlines and carriage returns from stdin
homepage
repositoryhttps://github.com/glennib/nln
max_upload_size
id1919495
size36,728
Glenn Bitar (glennib)

documentation

README

nln

Remove trailing newlines and carriage returns from stdin.

Crates.io Version

Installation

Using cargo:

cargo install nln

Using cargo-binstall (faster, no compilation):

cargo binstall nln

Using mise (global):

mise use -g cargo:nln

Or download binaries from releases.

Usage

# Remove trailing newlines
echo -e "hello\n\n" | nln

# Use with files
cat file.txt | nln

# Copy to clipboard without trailing newlines
cat script.sh | nln | pbcopy

The tool preserves newlines within content, only removing trailing ones.

License

MIT

Commit count: 0

cargo fmt