mirror of
https://github.com/uutils/coreutils
synced 2025-01-05 17:59:00 +00:00
Test if there are users before printing them.
This commit is contained in:
parent
d20d119416
commit
80d9af42aa
1 changed files with 4 additions and 2 deletions
|
@ -139,6 +139,8 @@ fn exec(filename: &str) {
|
||||||
endutent();
|
endutent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if users.len() > 0 {
|
||||||
users.sort();
|
users.sort();
|
||||||
println!("{}", users.connect(" "));
|
println!("{}", users.connect(" "));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue