Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs linux-terminal

wcat-command

wcat-command is a powerful CLI tool for displaying and manipulating file content directly in the terminal. It allows you to view and process files with various options for formatting and redirection.

wcat-command

Features

  • Display content of one or more files.
  • Format output with line numbers or compact line breaks.
  • Redirect output to files with options to overwrite or append.

Usage

Basic Commands

  • Display File Content:

    wcat filepath

    Displays the content of the specified file in the terminal.

  • Display Multiple Files:

    wcat filepath1 filepath2 filepath3...

    Concatenates and displays the content of multiple files in the specified order.

Options

  • Convert Multiple Line Breaks to a Single Line Break:

    wcat -s filepath

    Removes extra blank lines, leaving only single line breaks.

  • Number All Lines:

    wcat -n filepath

    Adds line numbers to every line in the output.

  • Number Non-Empty Lines:

    wcat -b filepath

    Adds line numbers only to non-empty lines in the output.

Redirection

  • Overwrite File: Redirect output to a file, creating it if it doesn't exist.

    wcat filepath > filename2path
  • Append to File: Append output to an existing file.

    wcat filepath >> filename2path
  • Remove Large Spaces and Save:

    node wcat -s filename > filename2

    Processes the file to remove extra spaces and saves the output to another file.

Mixing Options

You can combine options to tailor the output to your needs. For example:

wcat -n -s filepath > filename2path

This command numbers all lines and removes extra line breaks, saving the result to filename2path.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This a CLI command written in node.js.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages