Giter Club home page Giter Club logo

wc-lite's Introduction

wc-lite

CCWC - Custom Count Word Character

This Python script, ccwc.py, is a command-line utility that counts the number of bytes/characters/words/lines in a given file.

Dependencies

This script requires Python's built-in modules sys and argparse.

Use of the Tool

The tool takes a file or a pipe as an input and outputs file measurements according to the chosen option. The tool tries to follow wc syntax, the usage is as follows:

python3 main.py ccwc [option] filename There are five options supported:

generic: without an option, outputs the number of lines, words and bytes in a file. -c: outputs the number of bytes in a file. -l: outputs the number of lines in a file. -w: outputs the number of words in a file. -m: outputs the number of chars in a file. The tool also supports a combination of input, where the ccwc options are as given above, in the form:

cat filename | python3 main.py ccwc [option]

Learning Journey

This script is part of my journey learning programming. I'm working on small projects and challenges to improve my understanding of various programming languages and their standard libraries.

Contributing

As this is a personal learning project, I'm not currently accepting contributions. However, any feedback or suggestions are welcome!

Credits

This project is a solution to the WC-lite challenge on Coding Challenges. The challenge provided a great opportunity to improve my Python skills and learn more about handling command-line arguments in Python.

License

This project is licensed under the terms of the MIT license.

wc-lite's People

Contributors

revatim avatar

Stargazers

Stephen Odhiambo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.