Column widths FROM / WHAT in w(1)
bch at online.de
Thu Apr 11 09:09:30 UTC 2019
Polytropon <freebsd at edvax.de> writes:
> Any idea on how to get the old layout of w back, instead
> of increasing the terminal width?
w(1) is using ioctl's to determine the column width of the
terminal. Other tools like ps (-w) and top can be configured to
change the column width. On Linux, it seems that the variable
COLUMN allows overriding it.
Attached is a small patch that would add an environment check on
the COLUMN variable. Further processing would be possible then,
# COLUMN=180 ./w |sed 1d| cut -c 76-
tmux: client (/tmp//tmux-1000/default) (tmux)
cut -c 76-
I am not sure if there is another way to change the perceived
column width in w(1).
Christian Barthel <bch at online.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 869 bytes
Desc: not available
More information about the freebsd-questions