Skip to content

adarsh0raj/rust_wc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Word Count (rust_wc)

This is a simple version of the wc tool implemented in Rust. It counts the number of lines, words, and characters in a given file.

Usage

To use the rust_wc tool, follow these steps:

  1. Clone the repository:

    git clone https://github.com/adarsh0raj/rust_wc.git
  2. Build the project:

    cd rust_wc
    cargo build
  3. Run the executable:

    ./target/debug/rust_wc <flag> <file_path>

    Replace <file_path> and <flag> with the path to the file you want to count and the flag.

Example

Here's an example of how to use the rust_wc tool:

./target/debug/rust_wc -l ./Cargo.toml

Available flags:

  • -c or --bytes: print the byte counts
  • -l or --lines: print the newline counts
  • -w or --words: print the word counts
  • -m or --characters: print the character counts
  • -h or --help: display help and exit

Screenshot

Screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages