1.1.0 • Published 11 months ago

nodcat v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Linux Cat Commad Clone Using Raw Node.js

This Node.js script mimics the cat command in Linux, allowing you to read from a file or standard input and print the output with colored text.

You can read larger file content without any problem even 10gb or larger 🙂

Features

  • Reads from a file and outputs the content to the console.
  • Colors the output text using ANSI escape codes.
  • Converts stdin input to uppercase and colors it before printing.
  • Allows changing the file path dynamically by entering path:<filePath>.

you can install using npm also.

npm i nodcat

Usage if you install with npm

if you install it globally or locally then you can simply use nodcat <pathname> or

nodcat
path:<filename> like ./learning.c

Installation

  1. Clone the repository:

    git clone https://github.com/omorhawlader/CLI-using-nodejs-linux-cat-command-clone-with-extra-

    cd node-cat-command

Install dependencies

npm install

Usage

1.Run the script with a file path as an argument:

node cat.js <filePath>

Example:

node cat.js example.txt

2.Run the script and provide input via stdin:

node cat.js

Type the text and press Enter to see the colored uppercase output.

  1. Change the file path dynamically:
node cat.js

Enter path: to read from a new file.

Example

1.Reading from a file:

node cat.js example.txt
  1. Using stdin:
node cat.js

Input:

omar

Output:

OMAR

3.Changing file path dynamically:

node cat.js

Input:

path:example.txt

Contact

1.1.0

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago