[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Null character in replacement
From: |
Zachary Vance |
Subject: |
Null character in replacement |
Date: |
Thu, 23 Oct 2014 01:49:10 -0700 |
sed -e 's/^$/\x00/' replaces empty lines with the a line containing the
null byte.
sed -e "s/^$/\0/" (in bash, an s// expression containing a literal zero
byte) performs no replacements on the stream.
I am not sure if this is simply user error (including error understanding
how bash parses strings before it reaches sed), but I thought I'd report it
in case it was a parsing bug.
- Null character in replacement,
Zachary Vance <=