Created
December 8, 2013 16:45
-
-
Save lkptrzk/7860021 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| var concat = require('concat-stream') | |
| var target = 0 | |
| if (process.argv[2]) | |
| target = parseInt(process.argv[2], 10) | |
| process.stdin.pipe(concat(function (input) { | |
| var lines = input.toString().split('\n') | |
| lines.forEach(function (line) { | |
| var parts = line.split(',') | |
| console.log(parts[target]) | |
| }) | |
| })) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment