From 172e35d709d36b41a1355923dec1f563a3bb2183 Mon Sep 17 00:00:00 2001 From: Vivek Date: Tue, 21 Jun 2022 19:16:56 +0530 Subject: [PATCH] creating a file using command line --- apple.txt | 1 + command line.js | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 apple.txt create mode 100644 command line.js diff --git a/apple.txt b/apple.txt new file mode 100644 index 0000000..bca29ed --- /dev/null +++ b/apple.txt @@ -0,0 +1 @@ +this is fruit \ No newline at end of file diff --git a/command line.js b/command line.js new file mode 100644 index 0000000..934525b --- /dev/null +++ b/command line.js @@ -0,0 +1,3 @@ +const fs = require('fs'); +var input = process.argv; +fs.writeFileSync(input[2] , input[3]); \ No newline at end of file