Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created March 1, 2016 21:34
Show Gist options
  • Save tilpner/82ba2b4717a05aeea3a9 to your computer and use it in GitHub Desktop.
Save tilpner/82ba2b4717a05aeea3a9 to your computer and use it in GitHub Desktop.
use std::{env, io};
use std::fs::File;
fn main() {
let output = io::stdout();
env::args_os()
.skip(1)
.map(|f| {
let mut f = File::open(f).expect("Couldn't open file");
io::copy(&mut f, &mut output.lock()).expect("Couldn't read file");
})
.collect::<Vec<_>>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment