using sed to remove special chars and add spaces instead -
I have a block of text that I want to change:
^ @ ^ ^ @ Jfits ^ @ ^ a ^ @ pin ^ @ ^ a ^ @ sadface ^ @ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ @ ^ @ TTI ^ a ^ a ^ @ vuln ^ @ ^ a ^ @ yes ^ @
I use all the ^ @ ^ A ^ with some spaces < Code> (and variations of those characters)
I tried:
cat-A file | post-text "itemprop =" text "> if You can include allowed characters, then you
sed -e's / [^ a-zA-Z0- 9] / / g '
that No will replace everything in the set of alphanumeric characters with a place.
If you want to replace all 'non-printable' characters with spaces now You can use a character group [1] with
sed -e's / [^ [print:]] / / g.
sed Although some older versions may not support this syntax, but it is standardized in the Unix specification so that you do not feel guilty for using it. [2]
[1]
< P> [2]
Comments
Post a Comment