I'm writing a simple JS script which gets a file as input and does some manipulation to it:
node script.js file
The file part is accessed directly by using:
process.argv[2]
Now all i want is given that input, find that file and read it line by line into my function. I have a really hard time with this seemingly simple task since all solutions I found were HTML based.
I need this to run as an independent script.