[systemd-devel] list-units descriptions and trailing whitespace
Tom Matthews
tom at axiom-partners.com
Fri Oct 27 13:41:49 UTC 2017
Good afternoon,
Is there a good reason why list-units pads the description field out with trailing whitespace ?
$ systemctl list-units | cat -vet | head -6
UNIT LOAD ACTIVE SUB DESCRIPTION $
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point $
sys-devices-pci0000:00-0000:00:02.0-backlight-acpi_video0.device loaded active plugged /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0 $
sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d4-1\x2d4:1.0-host8-target8:0:0-8:0:0:0-block-sde-sde1.device loaded active plugged IUM01-512MFHS bpool $
sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d4-1\x2d4:1.0-host8-target8:0:0-8:0:0:0-block-sde-sde2.device loaded active plugged IUM01-512MFHS 2 $
sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d4-1\x2d4:1.0-host8-target8:0:0-8:0:0:0-block-sde-sde9.device loaded active plugged IUM01-512MFHS 9 $
Here is what I’d rather be receiving, is there any particular reason for padding the description field with whitespace?
$ systemctl list-units | sed -E 's/\s+$//' | cat -vet | head -6
UNIT LOAD ACTIVE SUB DESCRIPTION$
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point$
sys-devices-pci0000:00-0000:00:02.0-backlight-acpi_video0.device loaded active plugged /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0$
sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d4-1\x2d4:1.0-host8-target8:0:0-8:0:0:0-block-sde-sde1.device loaded active plugged IUM01-512MFHS bpool$
sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d4-1\x2d4:1.0-host8-target8:0:0-8:0:0:0-block-sde-sde2.device loaded active plugged IUM01-512MFHS 2$
sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d4-1\x2d4:1.0-host8-target8:0:0-8:0:0:0-block-sde-sde9.device loaded active plugged IUM01-512MFHS 9$
Kind regards,
Tom Matthews
More information about the systemd-devel
mailing list