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:
parent
440fb867bc
commit
f9627e02d0
1 changed files with 3 additions and 0 deletions
|
@ -147,6 +147,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
unbounded_tail(buffer, &settings);
|
unbounded_tail(buffer, &settings);
|
||||||
} else {
|
} else {
|
||||||
let mut multiple = false;
|
let mut multiple = false;
|
||||||
|
let mut first_header = true;
|
||||||
let mut readers = Vec::new();
|
let mut readers = Vec::new();
|
||||||
|
|
||||||
if files.len() > 1 {
|
if files.len() > 1 {
|
||||||
|
@ -155,8 +156,10 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
|
|
||||||
for filename in &files {
|
for filename in &files {
|
||||||
if multiple {
|
if multiple {
|
||||||
|
if !first_header { println!(""); }
|
||||||
println!("==> {} <==", filename);
|
println!("==> {} <==", filename);
|
||||||
}
|
}
|
||||||
|
first_header = false;
|
||||||
|
|
||||||
let path = Path::new(filename);
|
let path = Path::new(filename);
|
||||||
let file = File::open(&path).unwrap();
|
let file = File::open(&path).unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue