Skip to content
/ fwc Public

A Python-based clone of unix's `wc` tool to count bytes, characters, lines, and words of a text file.

License

Notifications You must be signed in to change notification settings

Fred-209/fwc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fwc - Word Counter

fwc is a Python-based clone of the Linux wc tool. It's is a command-line tool designed to output the byte count, line count, word count, and character count of a file. Wrapped in a bash script for easy usage

Features

  • Count bytes, lines, words, and characters in a file.
  • Support for reading from both files and standard input.
  • Simple command-line interface.

Installation

To use fwc, clone this repository to your local machine:

git clone https://github.com/Fred-209/fwc.git
cd fwc

Ensure that you have Python installed on your system. This script has been tested with Python 3.8 and above.

Usage

You can use fwc by specifying the filename as an argument or piping data into it. Here are some usage examples:

  • Display the byte count, line count, and word count of a file:
  ./fwc filename.txt
  • Display the number of bytes in a file:
  ./fwc -c filename.txt
  • Display the number of lines in a file:
  ./fwc -l filename.txt
  • Display the number of words in a file:
  ./fwc -w filename.txt
  • Display the number of characters in a file:
  ./fwc -m filename.txt
  • Display help/usage instructions:
  ./fwc -h
  • Use fwc with standard input:
  cat filename.txt | ./fwc

License

fwc is released under the MIT License. See the LICENSE file for more details.

About

A Python-based clone of unix's `wc` tool to count bytes, characters, lines, and words of a text file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published