nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] I need to learn more about MIME


From: norm
Subject: Re: [Nmh-workers] I need to learn more about MIME
Date: Sun, 14 Sep 2014 08:18:37 -0700

Ralph Corderoy <address@hidden> writes:
>Hi Norm,
>
>> The problem was that, for reasons I do not remember, Chart.pj had
>> Microsoft line endings and your "blanks", above includes '\r', and
>> probably other white space. Confession: It took me an hour to figure
>> that out.
>
>Useful ways to look for odd bytes in a file ./foo.  One approach is to
>delete what you think is valid and see what's left.
>
>tr -d '\012 -~' <foo | od -c
>
>Or look at their frequencies.
>
>$ tr -d '\012 -~' <foo | hexdump -ve '/1 "%02x\n"' | sort | uniq -c
>2 0d
>1 a3
>1 c2
>$
>
>`cat -A' can also be helpful.
>
>If you're having trouble tracking down the precise location then ask
>grep for byte offsets.
>
>LC_ALL=C grep -Eboa '[^ -~]+' foo | cat -A

Thank you very much for the tutorial.

I have a request (a request, not a demand!). When a command has both a '-'
option and a '--' option for the same feature, use the '--' version in
examples.

Thus:


grep --extended-regexp --byte-offset --only-matching --text

instead of

        grep -Eboa

Of course given a choice of a '-' example or no example at all, I'll take the
former.

    Norman Shapiro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]