Skip to content

Instantly share code, notes, and snippets.

@ichernev
Created November 11, 2011 13:22
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 ichernev/1357983 to your computer and use it in GitHub Desktop.
Save ichernev/1357983 to your computer and use it in GitHub Desktop.
Simple test to check if node stdout redirection works
#!/bin/bash
cat > test.js <<EOF!
var i;
for (i = 1; i <= 10; i++) {
console.log("for in loop " + i);
}
process.exit(0);
EOF!
node test.js | tee f1 > /dev/null
node test.js > f2
diff -q f1 f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment