wc-crystal

clone of wc command line tool

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
Repository

wc-crystal

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1
  • almost 2 years ago
  • October 25, 2022
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 00:58:10 GMT

Languages