Skip to content

Commit

Permalink
Update eko
Browse files Browse the repository at this point in the history
  • Loading branch information
bppleman committed Dec 20, 2023
1 parent f26c061 commit 71039e6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eko/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fn main() {
}
let cmd = &args[1];
match cmd {
cmd if cmd == "echo" => echo(),
cmd if cmd == "stdout" => stdout(),
cmd if cmd == "stderr" => stderr(),
cmd if cmd == "interval" => interval(
Expand All @@ -23,6 +24,13 @@ fn main() {
};
}

fn echo() {
let mut line = String::new();
if stdin().read_line(&mut line).is_ok() {
print!("{}", line);
}
}

fn stdout() {
for line in stdin().lines() {
match line {
Expand Down

0 comments on commit 71039e6

Please sign in to comment.