Bug 234975 - CLI issue with grep and width of terminal
Summary: CLI issue with grep and width of terminal
Status: Closed DUPLICATE of bug 217159
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-15 13:48 UTC by C Haas
Modified: 2019-01-15 19:48 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 C Haas 2019-01-15 13:48:34 UTC
Discovered an issue where if you are grepping for a string that falls outside of the window size, the line is not found.  For example, I was running 11.2-stable in a VM and ssh'ing into it from a MAC and only had a window up that was 80 char wide.  The `ps -aux` returned a string for a java program I was running that was well over 80 chars and the string i was searching for fell after the 80 char boundary.  that line was not returned in the grep search.
Comment 1 C Haas 2019-01-15 13:50:28 UTC
Forgot to mention, I tried many terminal clients (putty, mintty, vmware fusion guest window) and all had the same issue.
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2019-01-15 18:56:30 UTC
This is an old bug and attempts to fix it after 11.x were reverted by karels@ r330091.  You'll need to add the '-ww' flags to ps to get it to ignore terminal width.

*** This bug has been marked as a duplicate of bug 217159 ***
Comment 3 Deepak Nagaraj 2019-01-15 19:46:51 UTC
Hi Conrad, the fix was restored with a bit of change:
https://svnweb.freebsd.org/changeset/base/330712

Does this not apply to all later versions of FreeBSD?

Thanks,
Deepak
Comment 4 C Haas 2019-01-15 19:48:13 UTC
the -ww worked like a charm.  Thank you.