Clean a Linux or UNIX Text File to Strip Hidden Characters
-
Working with Postfix and got some hidden characters that were killing my file. So hard to find. But here is how you do it. In this example it is for the vmail_mailbox file, but this applies to just anything.
tr -cd '\11\12\40-\176' < vmail_mailbox > vmail_mailbox_clean
-
@scottalanmiller Great, but can you explain the syntax of the command?
-
@CCWTech said in Clean a Linux or UNIX Text File to Strip Hidden Characters:
@scottalanmiller Great, but can you explain the syntax of the command?
trim anything accept characters 11, 12, or 40-176. The acceptable character ranges.