| Crates.io | nln |
| lib.rs | nln |
| version | 1.0.1 |
| created_at | 2025-11-06 11:45:58.878628+00 |
| updated_at | 2025-11-07 22:41:31.468487+00 |
| description | Remove trailing newlines and carriage returns from stdin |
| homepage | |
| repository | https://github.com/glennib/nln |
| max_upload_size | |
| id | 1919495 |
| size | 36,728 |
Remove trailing newlines and carriage returns from stdin.
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.
# 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.
MIT