Description of problem:
Up to RHEL6, if you used the command
you would automatically get the "FROM" column in the output.
Starting with RHEL7
will omit the "FROM" column.
You think, ok, let me use some explicit cmd line option so that the script I'm using on RHEL5/6 will work the same on RHEL5/6 and 7.
Alas, this is not possible:
$ w -f
will take out the "FROM" column
$ w -f
will add the "FROM" column.
When the w's manual says "-f will TOGGLE" it means it literally :(
So, both "w" and "w -f" produce opposite outputs on RHEL7 with regards to previous RHEL versions.
On rhel6 the spec file had: W_SHOWFROM=-DW_SHOWFROM
On rhel7 it has --disable-w-from
Minor issue, on RHEL7, when using "-f", the column labels get misaligned by 1 char (1 space missing between "FROM" label and "LOGIN@" label).
Version-Release number of selected component (if applicable):
The w FROM issue has already been reported internally in scope of Bug 1078310. But the minor issue with column alignment you mentioned is something I never noticed before. Good catch. I'll fix that upstream and then backport/rebase in scope of RHEL7.
Thanks for the report.
Created attachment 1114841 [details]
After testing the patch uploaded above I noticed that fixing one space makes another misalignment if user tries another w's option (-s for example).
Because the spaces in headline are mostly hardcoded (!!!) even within upstream version, it is like hit-a-mole game.
The entire headline space computation should be reconsidered to be more dynamic, which may exceed the scope of this BZ.