[Bug 857039] New: "bash_command_not_found" sends output to STDOUT not STDERR
https://bugzilla.novell.com/show_bug.cgi?id=857039 https://bugzilla.novell.com/show_bug.cgi?id=857039#c0 Summary: "bash_command_not_found" sends output to STDOUT not STDERR Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: All OS/Version: openSUSE 13.1 Status: NEW Severity: Minor Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dabe@dabe.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=573080) --> (http://bugzilla.novell.com/attachment.cgi?id=573080) Patch for "/etc/bash_command_not_found" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:26.0) Gecko/20100101 Firefox/26.0 I noticed the following: prompt% asdfasdf | tr a-z A-Z ASDFASDF: COMMAND NOT FOUND prompt% asdfasdf | rev dnouf ton dnammoc :fdsafdsa I tracked the issue down to "/etc/bash_command_not_found" doing: echo $"$1: command not found" whereas I believe it should redirect that message to STDERR: echo $"$1: command not found" 1>&2 This dates back to previous versions of OpenSUSE, as well... Reproducible: Always Steps to Reproduce: 1. In bash[*], type a nonexistent command into a pipe, e.g. "asdfasdf | rev" or "asdfasdf | tr a-z A-Z" * - "/etc/zsh_command_not_found" seems to work okay... Actual Results: "rev" reverses the error message; tr capitalizes the output. Expected Results: The error messages should pass through unscathed. Included is a patch that adds the appropriate "1>&2" redirection(s) PS: Apart from being purely cosmetic, the reason I was pulling my hair out over this was because I was trying to make sure all the directories on "/home2" really corresponded to actual users' home directories -- but I had misspelled "awk" (Yeah, it's only three letters... I know!) So: prompt% akw -F: '{print $6}' /etc/passwd | grep '/home2' gave me no results, even though I *KNEW* there should have been a bunch... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857039 https://bugzilla.novell.com/show_bug.cgi?id=857039#c1 Xiyuan Liu <xyliu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |xyliu@suse.com Resolution| |DUPLICATE --- Comment #1 from Xiyuan Liu <xyliu@suse.com> 2014-01-02 02:30:23 UTC --- This bug has been marked as a duplicate of bug 857040. *** This bug has been marked as a duplicate of bug 857040 *** http://bugzilla.novell.com/show_bug.cgi?id=857040 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com