Eliminating binary from a text file

Eliminating binary from a text file

Amos Shapira amos.shapira at gmail.com
Tue Jul 21 07:53:21 IDT 2015


Then how about:

"grep -v -P -a '\x00' file"?

Based on http://superuser.com/a/612336/27453. Explantion of the flags:

-v - inverse - print NON-matching lines
-P - use Perl regexp
-a - force treating the file as a text file

On 21 July 2015 at 13:39, Shachar Shemesh <shachar at shemesh.biz> wrote:

>  On 21/07/15 00:22, Boruch Baum wrote:
>
> I see that I'm late to the discussion and that your original problem has
> morphed a bit. Maybe the simplest and oldest solution is the `tr -d'
> command. See `man tr'.
>
>
>  Read the original question again. She needs to eliminate the entire line
> where a corruption happened, not just the corrupt bytes themselves.
>
> Shachar
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>


-- 
<http://au.linkedin.com/in/gliderflyer>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20150721/94b2e69f/attachment.html>


More information about the Linux-il mailing list