1.0.0 • Published 3 years ago
@roland1993/sum-file v1.0.0
sumfile ➕📡
Introduction
A simple tool to output the sum of numbers located in a file line by line
Installation
npm install -g @roland1993/sum-file
Usage with example
Say you have 3 files:
A.txt:
3
19
B.txt
50
B.txt:
C.txt
27
C.txt:
10
2
Then in your terminal you run sumfile A.txt
The output of the command above will be:
A.txt - 111
B.txt - 39
C.txt - 12
Downloading and running it with node
- Download the source code
- Open the terminal in the project's root
- Run
npm install
- Run
node -r esm src path/to/a/file
For example:
node -r esm src C:/Users/username/Desktop/TEST/a.txt