Skip to content

SelinJodhani/wc-unix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Challenge 1 - wc unix tool

This challenge corresponds to the first part of the Coding Challenges series by John Crickett.

Description

The WC tool is written in go. The tool is used to count the number of words, lines, bytes and characters in a file/stdin.

Build

You can build this project as follows:

go build ./cmd/ccwc

This will make binary file in the root directory named ccwc. Binary file of this project is already present inside ./bin/ccwc.

Usage

You can use ./bin/ccwc to run the tool as follows:

./bin/ccwc [option] filename

The following options are supported:

  • -w: prints the number of words in the file
  • -l: prints the number of lines in the file
  • -c: prints the number of bytes in the file
  • -m: prints the number of characters in the file

The tool can also be used in stdin mode as follows:

cat filename | ./bin/ccwc [option]

Credits

Thanks to @jainmohit2001 for the thought process and readme.md. Checkout other solutions by him jainmohit2001/coding-challenges.

About

Clone of a unix wc command in golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages