mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +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…
Add table
Add a link
Reference in a new issue