|
Tips & Tricks, Questions regarding shell scripts, awk, perl, sed and much more.
Author |
Message |
admin
|
 |
Post subject: PERL: How to replace non-ascii characters/bytes in a file | Posted: Fri Apr 10, 2015 8:58 am |
|
Site Admin
Joined: Mon Aug 03, 2009 8:43 am Posts: 104
|
PERL: How to replace non-ascii characters/bytes in a file
To remove a non-ascii 9B byte in a file:Code: perl -i.bak -pe 's/\x9B//g' file.txt To replace a non-ascii 9B byte with a new line:Code: perl -i.bak -pe 's/\x9B/\x0A/g' file.txt
_________________ VPSie - SSD VPS servers in AMS-IX, LINX, DE-CIX https://vpsie.com
|
|
|
|
|
|
|
Users browsing this forum: No registered users and 0 guests |
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
 News Site map SitemapIndex RSS Feed Channel list
|
|