Rust 0.8 version of the file sort utility
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
extern mod extra; | |
use std::*; | |
use extra::*; | |
fn main() { | |
let reader = io::file_reader(&Path(os::args()[1])).unwrap(); | |
let writer = io::file_writer(&Path(os::args()[2]), | |
[io::Append, io::Create]).unwrap(); | |
let mut lines = reader.read_lines(); | |
sort::quick_sort3(lines); | |
for l in lines.iter() { | |
writer.write_line(*l) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment