mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 14:52:41 +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();
|
||||
}
|
||||
|
||||
if users.len() > 0 {
|
||||
users.sort();
|
||||
println!("{}", users.connect(" "));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue