1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tail: print empty line between headers

This commit is contained in:
Mariano Casco 2016-05-30 17:32:57 -03:00
parent 440fb867bc
commit f9627e02d0

View file

@ -147,6 +147,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
unbounded_tail(buffer, &settings);
} else {
let mut multiple = false;
let mut first_header = true;
let mut readers = Vec::new();
if files.len() > 1 {
@ -155,8 +156,10 @@ pub fn uumain(args: Vec<String>) -> i32 {
for filename in &files {
if multiple {
if !first_header { println!(""); }
println!("==> {} <==", filename);
}
first_header = false;
let path = Path::new(filename);
let file = File::open(&path).unwrap();