Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 857 Bytes

README.md

File metadata and controls

48 lines (32 loc) · 857 Bytes

wc command line tool

a simple version of the UNIX's command line tool "wc" written in golang.

Installation

To use this, clone the repo:

git clone https://github.com/awmpietro/wc.git

Usage:

Build and install

go install github.com/awmpietro/ccwc

In your terminal, use the commands:

// count the number of bytes
ccwc -c test.txt

// count the number of lines
ccwc -l test.txt

// count the number of words
ccwc -w test.txt

// count the number of characters
ccwc -m test.txt

// no options are provided is the equivalent to the -c, -l and -w options
ccwc test.txt

// read from standard input if no filename is specified
cat test.txt | ccwc -c
cat test.txt | ccwc -l
cat test.txt | ccwc -w
cat test.txt | ccwc -m

Contributing

Feel free to open issues or PRs if you find any problems or have suggestions!