Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command Line Tool - wc

Overview


Project Documentation

Purpose

This project provides a simple text-counting tool that can be used on files or piped input.

Core capabilities

  • Count lines
  • Count words
  • Count bytes
  • Accept one or more files as input
  • Read from standard input

Installation

  1. Clone the repository
$ git clone https://github.com/prak112/CodingChallenge_wc-tool.git
  1. Change directory
$ cd CodingChallenge_wc-tool/
  1. Use pipx to install as a global tool by installing within a managed virtual environment
$ pipx install cc_wc

Usage Instructions

$ cc_wc --help #lists usage, arguments, options for the tool (Thanks to 'typer')

Common options

  • -l, --lines - count lines only
  • -w, --words - count words only
  • -c, --bytes - count bytes only
  • -m, --charcters - count characters only

Examples

$ cc_wc file.txt    #counts lines, words, bytes of file.txt
7145 58164 335045 test.txt
$ cc_wc -l file.txt    #counts lines in file.txt
7145 test.txt
$ cat file.txt | cc_wc -w    #counts words by reading from standard input
58164

Resources


About

Simplified python version of wc (Unix CLI tool for file metrics)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages