Skip to content

Instantly share code, notes, and snippets.

@soomtong
Last active December 11, 2015 17:08
Show Gist options
  • Save soomtong/4632116 to your computer and use it in GitHub Desktop.
Save soomtong/4632116 to your computer and use it in GitHub Desktop.
- 이런 코드 짜려고 굳이 파이썬 책 보며 코딩할 필요 없겠구나.
// combine keyword
var fs = require('fs');
fs.readFileSync('1.txt').toString().split('\n').forEach(function(line) {
var token = line;
fs.readFileSync('2.txt').toString().split('\n').forEach(function(line) {
var make = token.trim() + ' ' + line.trim();
console.log(make);
fs.appendFileSync('3.txt', make.toString() + '\n');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment