[Bug 797821] New: grep misdetects /sys files as binary files
https://bugzilla.novell.com/show_bug.cgi?id=797821 https://bugzilla.novell.com/show_bug.cgi?id=797821#c0 Summary: grep misdetects /sys files as binary files Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: uwe.menges@sap.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 I use patterns like this: # grep -H . /sys/block/[sv]d*/queue/scheduler # grep . /sys/kernel/mm/ksm/* to get maximum information in minimum number of lines. Unfortunately, this doesn't work with grep of openSUSE 12.2, because there grep treats /sys files as binary files and doesn't give the content as output but just a "Binary file ... matches" line per file. Reproducible: Always Steps to Reproduce: 1. grep . /sys/kernel/mm/ksm/* Actual Results: # grep . /sys/kernel/mm/ksm/* Binary file /sys/kernel/mm/ksm/full_scans matches Binary file /sys/kernel/mm/ksm/pages_shared matches Binary file /sys/kernel/mm/ksm/pages_sharing matches Binary file /sys/kernel/mm/ksm/pages_to_scan matches Binary file /sys/kernel/mm/ksm/pages_unshared matches Binary file /sys/kernel/mm/ksm/pages_volatile matches Binary file /sys/kernel/mm/ksm/run matches Binary file /sys/kernel/mm/ksm/sleep_millisecs matches Expected Results: # grep . /sys/kernel/mm/ksm/* /sys/kernel/mm/ksm/full_scans:0 /sys/kernel/mm/ksm/pages_shared:0 /sys/kernel/mm/ksm/pages_sharing:0 /sys/kernel/mm/ksm/pages_to_scan:100 /sys/kernel/mm/ksm/pages_unshared:0 /sys/kernel/mm/ksm/pages_volatile:0 /sys/kernel/mm/ksm/run:0 /sys/kernel/mm/ksm/sleep_millisecs:20 -- 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=797821 https://bugzilla.novell.com/show_bug.cgi?id=797821#c Jiaying ren <jren@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jren@suse.com AssignedTo|bnc-team-screening@forge.pr |jsmeix@suse.com |ovo.novell.com | -- 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=797821 https://bugzilla.novell.com/show_bug.cgi?id=797821#c1 Johannes Meixner <jsmeix@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Platform|x86-64 |All Found By|--- |Community User Resolution| |INVALID --- Comment #1 from Johannes Meixner <jsmeix@suse.com> 2013-01-11 09:54:32 CET --- No autodetection can work perfectly in all cases. I think there are good reasons why the autodetection was changed by the grep upstream authors so that now grep treats /sys files as binary files. To enforce grep to "Process a binary file as if it were text" see what "man 1 grep" tells about "binary". The issue is no bug in particular because there is a grep command line option to specify the type of files that grep autodetects as binary files. Accordingly I close this issue as "invalid". If you think grep's file type autodetection needs to be changed or improved, please contact grep upstream directly, see http://www.gnu.org/software/grep/ so that there is a direct communication between you and the upstream authors, see also "UPSTREAM" at https://bugzilla.novell.com/page.cgi?id=fields.html#status -- 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