Skip to content

mlhsn/wc-crystal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word counter

wc - print newline, word, and byte counts for given file. Clone of *nix wc command written in Crystal.

  • Only Support one file per command invoke.
  • DO NOT expect feature parity with wc command.
  • This project is educational. I will not support with feature/fix request.
  • UNSTABLE, pre-alpha status.

Installation

  • Install Crystal
  • Clone this repository to a directory and go to the directory
  • Run following
    $ shards build
  • You'll find compiled executable on ~/<setup-dir>/bin/wc

Usage

# show char, word, line count
$ wc ~/start-up.sh
1090	82	42

# show only char count
$ wc ~/start-up.sh -c
1090

# show only word count
$ wc ~/start-up.sh -w
82

# show only word count use
$ wc ~/start-up.sh -l
42

About

clone of wc command line tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published