jyotijauhari / wincat

cat commands for windows. this project is made while learning node js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wincat

  • wincat : cat commands for windows.
  • cat command: Cat command is very frequently used in Linux. It reads data from the file and gives their content as output. It helps us to create, view, concatenate files.

Commands :

  1. To view a single file
node wincat.js filename

eg.

node wincat.js f1.txt

  1. To view contents of multiple files
node wincat.js fileone filetwo filethree

eg.

node wincat.js f1.txt f2.txt

  1. To view content of file with line number
node wincat.js -n filename

eg.

node wincat.js -n f1.txt

  1. To create a new file
node wincat.js -create filename

eg.

node wincat.js -create f3.txt

  1. Copy content of one file to other (fileone to filetwo)
node wincat.js -copy fileone filetwo

eg.

node wincat.js -copy f1.txt f2.txt

  1. cat command to suppress repeated empty lines
node wincat.js -s filename

eg.

node wincat.js -s f1.txt

  1. cat command to not number empty files (numbering non empty/non blank lines only)
node wincat.js -b filename

eg.

node wincat.js -b f1.txt

  1. Command to append content of one file at end of other file. (from fileone to end of filetwo)
node wincat.js -append fileone filetwo

eg.

node wincat.js -append f1.txt f2.txt

  1. Highlight end of file
node wincat.js -highlight filename

eg.

node wincat.js -highlight f1.txt

  1. Cat command to write in existing file (or it will create new file if file doesn't exists)
node wincat.js -w filename
this is data you want to write

eg.

node wincat.js -w f6.txt
i am writing data in file f6 write after creation from console

  1. Reverse print file
node wincat.js -reverse filename

eg.

node wincat.js -reverse f1.txt

Edge case

  • If file entered is not found then it gives file doesn't exist error. ✅

About

cat commands for windows. this project is made while learning node js.


Languages

Language:JavaScript 100.0%