grep - Bugs: bug #34020, RFE: Improve handling of sparse...
You are not allowed to post comments on this tracker with your current authentication level.
bug #34020: RFE: Improve handling of sparse files
Submitter: | Jaroslav Škarvada <yarda> | ||
Submitted: | Tue 16 Aug 2011 08:21:43 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Wed 21 Dec 2011 07:01:10 PM UTC, comment #2: |
Paul Eggert <eggert> |
Wed 21 Dec 2011 03:57:45 PM UTC, comment #1: This is not a bug. The problem is not the sparseness of the file. The problem is that grep works on lines, and lines are separated by LF characters. So, a file that has 2GB of NULLs still has a single line.
|
Paolo Bonzini <bonzini> |
Tue 16 Aug 2011 08:21:43 AM UTC, original submission:
Handling of sparse files should be improved, e.g the following example is handled by sed, but not by grep:
|
Jaroslav Škarvada <yarda> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2011-08-16 | rwmj | Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-02a9.
Corresponding source code
How about the following idea instead (it is simpler
and should be more efficient too):
Change 'grep' so that by default it ignores all NULs
in binary input files. POSIX allows this behavior, and it
is typically far more useful than what grep does now.
People who really want to examine the NULs can use
the -a option as before.
If we see a file with holes, treat it as binary, and
ignore the holes by default.