sed - remove nul lines from file
James B. Byrne
byrnejb at harte-lyne.ca
Tue Nov 7 18:01:16 UTC 2017
On Tue, November 7, 2017 12:36, Yuri Pankov wrote:
>
> Apparently, our regex engine doesn't accept the '\x' syntax, try a bit
> more complicated, but standard way :-)
>
> sed '/[[.NUL.]]/d'
>
sed /[[.NUL.]]/g INFILE > OUTFILE
gives the same result as
tr < INFILE -d '\000' > OUTFILE
sed /^[[.NUL.]]$/g INFILE > OUTFILE has no effect whatsoever. No
doubt because I am not specifying the record delimiters appropriately.
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the freebsd-questions
mailing list