Bug 234975

Summary: CLI issue with grep and width of terminal
Product: Base System Reporter: C Haas <haasca2112>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed DUPLICATE    
Severity: Affects Many People CC: karels, n.deepak
Priority: ---    
Version: 11.2-STABLE   
Hardware: Any   
OS: Any   

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.