8000 GitHub - vlmaier/wk: Coding Challenge #1 - Build your own wc!
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vlmaier/wk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
< 8238 svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">
 
 

Repository files navigation

wk - the wc clone

Coding Challenge #1 - Build your own wc!

The functional requirements for wc are concisely described by it’s man page - give it a go in your local terminal now:

man wc

The TL/DR version is: wc – word, line, character, and byte count.

Usage

Clone

git clone git@github.com:vlmaier/wk.git

Install

./install

Run

wk -h
Usage: wk [<options>] [<filename>]

Options:
  -c          The number of bytes in the input file or stdin is written to the stdout.
  -l          The number of lines in the input file or stdin is written to the stdout.
  -m          The number of characters in the input file or stdin is written to the 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          The number of words in the input file or stdin is written to the stdout.
  -h, --help  Show this message and exit
0