Skip to content

NathanClassen/nhwc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nhwc

A full-featured clone of the Unix tool wc written in Go!

Written to solve the first challenge over at Coding Challenges


Build

make build

This will create a binary at bin/nhwc

Usage

Invoke nhwc passing in desired options followed by 0 or more files. nhwc will output how many lines, words, bytes, or character each file contains, based on options specified.

If no files are provided, nhwc will read from stdin until EOF (or ^D) and take this as input to the program.

nhwc [-c -l -m -w] [file ...]

-c will write the number of bytes in each input file to the stdout – this option will cancel out any prior usage of the -m option.

-l will write the number of lines in each input file to the stdout.

-m will write the number of characters in each input file to stdout. If the current locale does not support multibyte characters, this is equivalent to the -c option. This will cancel out any prior usage of the -c option.

-w will write the number of words in each input file to the stdout.

About

wc but in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors