Skip to content

A UNIK-like command line utility for printing newline, word and byte counts for files. ๐Ÿ”ง

License

Notifications You must be signed in to change notification settings

mohanadft/wc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

wc-cli โ€” A Rust-Powered Word Count Utility ๐Ÿš€

Welcome to wc-cli, a blazing-fast reimagining of the classic wc command, written in Rust! ๐Ÿฆ€ This project is inspired by Unix's wc command, and it's here to help you count words, lines, characters, and moreโ€”quickly and efficiently.

๐Ÿš€ Features

  • Line Count (-l): Count the number of lines in a file.
  • Word Count (-w): Get the word count with precision.
  • Character Count (-c): How many characters are in your file? Find out!
  • Longest Line (-L): Measure the length of the longest line for optimized file reading.
  • Bytes Count (-m): Count the number of bytes in a file.
  • Total (--total): Show total counts across multiple files with always, never, or auto modes.

๐Ÿ“ฆ Installation

Installing wc-cli is easy! First, make sure you have Rust installed on your machine. Then, run the following commands:

  git clone https://github.com/mohanadft/wc-cli.git # Clone the Repo
  cd wc-cli                                         # Go inside the package
  cargo install --path .                            # Install the package globally

โŒจ๏ธ Usage

Simple and intuitive to use! Just like the Unix wc command, but better ๐Ÿ˜‰.

  wc-cli [OPTIONS] [FILE_NAME]...
  Arguments:
    [FILE_NAME]...  files to be read

  Options:
    -c, --bytes            print the byte counts
    -m, --chars            print the chars counts
    -l, --lines            print the lines counts
    -w, --words            print the words counts
    -L, --max-line-length  print the maximum display width
    --total <TOTAL>    when to print a line with total counts; [default: always] [possible values: auto, always, never]
    -h, --help             Print help
    -V, --version          Print version

๐ŸŒŸ Why Rust?

Rust's zero-cost abstractions and memory safety make wc-cli not only fast but also reliable and safe for handling large files without breaking a sweat.

๐Ÿค Contributing

Want to add new features, fix bugs, or improve the codebase? PRs are welcome! Check out our CONTRIBUTING.md to get started.

About

A UNIK-like command line utility for printing newline, word and byte counts for files. ๐Ÿ”ง

Topics

Resources

License

Stars

Watchers

Forks

Languages