Bug 283414 - jls (8) doesn't handle newlines in values consistently
Summary: jls (8) doesn't handle newlines in values consistently
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-jail (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-19 11:09 UTC by Dave Cottlehuber
Modified: 2024-12-22 18:21 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Cottlehuber freebsd_committer freebsd_triage 2024-12-19 11:09:12 UTC
# jail -c persist osrelease="$(echo major=1; echo minor=0)"
# jls
JID IP Address Hostname Path
145 /
# jls osrelease jid
major=1
minor=0 145

the manpage clearly states:

Each jail is represented by one row which contains space-separated values of the listed parameter

Either we should amend the manpage, or swap newlines for spaces consistently on all parameters.

It seems that a trailing newline is removed, so perhaps for consistency we should replace all newlines with space when this single-line output is used.