Skip to content

Instantly share code, notes, and snippets.

@ScalaWilliam
Created January 7, 2017 21:46
Show Gist options
  • Save ScalaWilliam/e37d8141b662e61be91672039053e12f to your computer and use it in GitHub Desktop.
Save ScalaWilliam/e37d8141b662e61be91672039053e12f to your computer and use it in GitHub Desktop.
Interleave N streams line-by-line (doesn't close!)
BEGIN {
while(1) {
ch = 0
while(++ch < ARGC)
if ( getline < ARGV[ch] )
print
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment