Skip to content

Instantly share code, notes, and snippets.

@deepal
Created June 8, 2021 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepal/a5261986e165fe21e3928f3eb7d3f207 to your computer and use it in GitHub Desktop.
Save deepal/a5261986e165fe21e3928f3eb7d3f207 to your computer and use it in GitHub Desktop.
const fs = require('fs')
const original = fs.createReadStream('./original.txt')
const copy1 = fs.createWriteStream('./copy1.txt')
const copy2 = fs.createWriteStream('./copy2.txt')
original.pipe(copy1)
original.pipe(copy2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment