Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #13559

Re: DeMime M$hit ?

From no.top.post@gmail.com
Newsgroups comp.os.linux.misc
Subject Re: DeMime M$hit ?
Date 2015-02-03 05:15 +0000
Organization A noiseless patient Spider
Message-ID <maplh5$jfj$1@dont-email.me> (permalink)
References <maas5u$ipe$1@dont-email.me>

Show all headers | View raw


In article <maas5u$ipe$1@dont-email.me>, Joe Beanfish <joebeanfish@nospam.duh> wrote: 

> On Tue, 27 Jan 2015 08:27:21 +0000, Unknown wrote:
> 
> > On Fri, 23 Jan 2015 18:10:31 +0000, Kenny McCormack wrote:
> > 
> >> In article <1d4f3c4014beabd37a374f3248511b34@remailer.privacy.at>,
> >> Anonymous Remailer (austria) <mixmaster@remailer.privacy.at> wrote:
> >>>
> >>>Avoid9...@gmail.com <Avoid9...@gmail.com> [A]: A> remove the 2-char:
> >>>"="<EOL> , line overflow A> How would you do/EXPLAIN this?
> >>>
> >>><infile awk -v RS='=\r' -v ORS='' 1  >outfile
> -- snip --
> That's an awk function per your earlier mention of awk. Except it
> will only print broken lines. This awk will print all while fixing
> the broken lines.
> 
> awk '{ if(sub(/=$/," ")!=0){ printf("%s",$0);}else{print;} }' <infile 
> >outfile
> 
> Note that it won't fix other "quoted printable" characters that may
> be embedded in the text. A full decoder as mentioned in other responses
> will handle those too.
> https://en.wikipedia.org/wiki/Quoted-printable
===
-> cat In ==
abc=
ABCD
123=
4567

-> awk '{ if(sub(/=$/," ")!=0){ printf("%s",$0);}else{print;} }' <In
abc ABCD
123 4567
=> Good!

-> awk '{ if(sub(/=$/," ")!=0){ printf("%s",$0);}else{print;} }' <Xmpl1 >MS
== Bad: no translation

-> hexdump -C Xmpl1 | tail -4 ==
00002040  3e 3c 42 52 3e 26 6e 62  73 70 3b 3c 2f 50 3e 3c  |><BR>&nbsp;</P><|
00002050  2f 42 4f 44 59 3e 3c 2f  48 54 4d 4c 3e 0d 0a 0d  |/BODY></HTML>...|
00002060  0a 0d 0a 0d 0a 0d 0a 0d  0a                       |.........|

=> M$ char(13) messes it.
-> cat DeMime.sh
awk '{ if(sub(/=$/," ")!=0){ printf("%s",$0);}else{print;} }' \
 <

->  fromdos -h ==
Usage: fromdos < dostextfile > unixtextfile

Now the <piping> is completely unmanagable for me;
but `tr` can just first delete <char(13)>.

So HOW2  pipe/combine:
tr -d "\015" | <JB-oneLiner> 

-> cat G ==
cat $1 | tr -d "\015" |\
awk '{ if(sub(/=$/," ")!=0){ printf("%s",$0);}else{print;} }' \
>$2

./G Xmpl1 Out == better, with long-lines; but still:
of En ergy,=20
    becomes:
of En=

ergy,=20

    where "r" is char(13) <-now in a different editor, which doesn't show "r"

Since my initial assumption that deMime just needs deleting <=$>
is wrong, my project fails!

Thanks for the input.

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: DeMime M$hit ? "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2015-01-23 18:52 +0100
  Re: DeMime M$hit ? gazelle@shell.xmission.com (Kenny McCormack) - 2015-01-23 18:10 +0000
    Re: DeMime M$hit ? Unknown <dog@gmail.com> - 2015-01-27 08:27 +0000
      Re: DeMime M$hit ? Joe Beanfish <joebeanfish@nospam.duh> - 2015-01-28 14:36 +0000
        Re: DeMime M$hit ? gazelle@shell.xmission.com (Kenny McCormack) - 2015-01-28 19:13 +0000
        Re: DeMime M$hit ? gazelle@shell.xmission.com (Kenny McCormack) - 2015-01-29 10:53 +0000
        Re: DeMime M$hit ? no.top.post@gmail.com - 2015-02-03 05:15 +0000
  Re: DeMime M$hit ? "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2015-01-24 00:21 +0100
    Re: DeMime M$hit ? Unknown <dog@gmail.com> - 2015-01-27 08:27 +0000

csiph-web