Skip to content

Instantly share code, notes, and snippets.

@taybenlor
Last active September 12, 2022 10:36
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 taybenlor/da708221070d96616f1886b88f4a6728 to your computer and use it in GitHub Desktop.
Save taybenlor/da708221070d96616f1886b88f4a6728 to your computer and use it in GitHub Desktop.
print content in each args file to STDOUT
use std::{env, fs};
fn main() {
for filename in env::args().skip(1) {
let content = fs::read_to_string(filename).expect("unable to read file");
print!("{}", content);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment