You can match hex characters with \x. Just put \x before the hexadecimal number. For instance, if you wish to replace all backspace characters with nothing, use this:
perl -pi -e "s|\x08||g" file.txt |
Our readers provide the funding for our platform, and we may receive a commission when you make a purchase using the links on our site.
By Paul Anderson / October 3, 2016 — Perl
You can match hex characters with \x. Just put \x before the hexadecimal number. For instance, if you wish to replace all backspace characters with nothing, use this:
perl -pi -e "s|\x08||g" file.txt |
Paul is an Avid Tech Geek who Loves writing, Cycling and All Things Linux! He comes from a Background of Windows Administration along with Ubuntu/Centos Server administration. Paul holds industry wide certifications include CompTIA & Microsoft Accredited certifications.