Skip to content

hostname: different behavior with -d flag #8656

@bakanovskii

Description

@bakanovskii

If hostname doesn't have a domain part (e.g.: localhost) the coreutils binary prints hostname while GNU hostname prints nothing

GNU hostname:

$ hostname -f
debianpc
$ hostname -s
debianpc
$ hostname -d
$ hostname -sd
$

uutils hostname:

$ cargo run -r --all-features -- hostname -f
debianpc
$ cargo run -r --all-features -- hostname -s
debianpc
$ cargo run -r --all-features -- hostname -d
debianpc
$ cargo run -r --all-features -- hostname -sd
debianpc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions