Skip to content

yaralahruthik/cc-wc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write Your Own wc Tool

This challenge was to build my own version of the Unix command line tool wc!

Challenge Link

Description

This cli tool is a part replica of wc command in linux. It counts the number of lines, words and characters in a file.

Usage

$ go run main.go <filename>

Also, supports reading from standard input if no file is provided to read.

$ cat abcd | go run main.go

Flags

  • -l : Prints the number of lines in the file.
  • -w : Prints the number of words in the file.
  • -c : Prints the number of bytes in the file.
  • -m : Prints the number of characters in a file. If the current locale does not support multibyte characters this will match the -c option

If no flag is provided, number of lines, words, and bytes are printed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages