看板 FB_bugs 關於我們 聯絡資訊
>Number: 137647 >Category: misc >Synopsis: ps output depends on terminals column width when piping or redirecting >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 10 20:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Ivan Radovanovic >Release: 7.2 >Organization: >Environment: FreeBSD azdaja.softwarehood.com 7.2-STABLE FreeBSD 7.2-STABLE #0: Mon Aug 3 17:12:57 CEST 2009 rivan@azdaja.softwarehood.com:/usr/src/sys/i386/compile/Azdaja i386 >Description: ps command formats its output according to setting of terminal it is running on even when piped or redirected to a file. This can cause serious confusion when using it in combination with other commands (for example ps -axj | grep opera won't give any output regardless opera browser is running in the example in "how to repeat" section) >How-To-Repeat: open xterm, set its width to 40 columns, do ps -axj > ps.txt ps.txt will be 40 columns wide >Fix: use isatty or stat to determine if ps's output is terminal >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"