Last active
September 12, 2022 10:36
-
-
Save taybenlor/da708221070d96616f1886b88f4a6728 to your computer and use it in GitHub Desktop.
print content in each args file to STDOUT
This file contains 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
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