On Thu, 2024-04-18 at 12:24 +0200, Mira Limbeck wrote:
> Would it be possible to align these correctly, or just use a single
> space between type and value?

> I'd prefer explicit commands like:

Better formatting can of course be achieved, see the adapted example below, 
followed by your mentioned `cat` structure.


# cd /sys/devices/virtual/dmi/id; grep -H "" sys_vendor product_name 
product_version | column -t -s:
sys_vendor       HP
product_name     ProLiant DL380p Gen8
product_version  Not specified

# cd /sys/devices/virtual/dmi/id; grep -H "" board_vendor board_name 
board_version | column -t -s:
board_vendor   ASUSTeK COMPUTER INC.
board_name     Z13PP-D32 Series
board_version  60SB09M0-SB0G11


# cat /sys/devices/virtual/dmi/id/sys_vendor
HP

# cat /sys/devices/virtual/dmi/id/product_name
ProLiant DL380p Gen8

# cat /sys/devices/virtual/dmi/id/product_version
Not specified

# cat /sys/devices/virtual/dmi/id/board_vendor
ASUSTeK COMPUTER INC.

# cat /sys/devices/virtual/dmi/id/board_name
Z13PP-D32 Series

# cat /sys/devices/virtual/dmi/id/board_version
60SB09M0-SB0G11


> Adding at least one additional newline per file read, but there would be
> no need for cd-ing, printing the filename with grep and trying to align
> the output.

While so far I see no problem with using `cd` or pipes in general, maybe 
someone else has a strong preference.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to