Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #13491 > unrolled thread
| Started by | "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> |
|---|---|
| First post | 2015-01-23 18:52 +0100 |
| Last post | 2015-01-27 08:27 +0000 |
| Articles | 9 — 5 participants |
Back to article view | Back to comp.os.linux.misc
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> |
|---|---|
| Date | 2015-01-23 18:52 +0100 |
| Subject | Re: DeMime M$hit ? |
| Message-ID | <1d4f3c4014beabd37a374f3248511b34@remailer.privacy.at> |
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 This tells awk to - split its input using the specified string RS (actually regular expression) as a record delimiter and - print out the records without any record delimiter (ORS) after each one of them.
[toc] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2015-01-23 18:10 +0000 |
| Message-ID | <m9u2qn$r0h$1@news.xmission.com> |
| In reply to | #13491 |
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
>
>This tells awk to
>
>- split its input using the specified string RS (actually regular
> expression) as a record delimiter
>
>and
>
>- print out the records without any record delimiter (ORS) after
> each one of them.
>
Actually, don't you only want to join the lines if the last line is "=" ?
(Not otherwise)
So, if your input is:
long line long line long line long line long line long line long line long line=
short line short line
short line short line
short line short line
short line short line
long line long line long line long line long line long line long line long line=
short line short line
short line short line
short line short line
short line short line
The output should be:
long line long line long line long line long line long line long line long line short line short line
short line short line
short line short line
short line short line
long line long line long line long line long line long line long line long line short line short line
short line short line
short line short line
short line short line
So, it should be something like (untested):
sub(/=$/," ") { printf("%s",$0);next }
17
--
Just for a change of pace, this sig is *not* an obscure reference to
comp.lang.c...
[toc] | [prev] | [next] | [standalone]
| From | Unknown <dog@gmail.com> |
|---|---|
| Date | 2015-01-27 08:27 +0000 |
| Message-ID | <pan.2015.01.27.08.36.51@gmail.com> |
| In reply to | #13492 |
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
>>
>>This tells awk to
>>
>>- split its input using the specified string RS (actually regular
>> expression) as a record delimiter
>>
>>and
>>
>>- print out the records without any record delimiter (ORS) after
>> each one of them.
>>
>>
> Actually, don't you only want to join the lines if the last line is "="
> ? (Not otherwise)
>
> So, if your input is:
>
> long line long line long line long line long line long line long line
> long line= short line short line
> short line short line
> short line short line
> short line short line
> long line long line long line long line long line long line long line
> long line= short line short line
> short line short line
> short line short line
> short line short line
>
> The output should be:
>
> long line long line long line long line long line long line long line
> long line short line short line short line short line
> short line short line
> short line short line
> long line long line long line long line long line long line long line
> long line short line short line short line short line
> short line short line
> short line short line
>
> So, it should be something like (untested):
>
> sub(/=$/," ") { printf("%s",$0);next } 17
The line-len is unimportant, if I use it for TextToSpeech;
and if I need to read/keep it, I just filter it through <format>
which folds the lines at the suitable word-break.
==Thanks.
PS. `which sub` == unknown
we use bash not <C is it?>
[toc] | [prev] | [next] | [standalone]
| From | Joe Beanfish <joebeanfish@nospam.duh> |
|---|---|
| Date | 2015-01-28 14:36 +0000 |
| Message-ID | <maas5u$ipe$1@dont-email.me> |
| In reply to | #13495 |
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
>>>
>>>This tells awk to
>>>
>>>- split its input using the specified string RS (actually regular
>>> expression) as a record delimiter
>>>
>>>and
>>>
>>>- print out the records without any record delimiter (ORS) after
>>> each one of them.
>>>
>>>
>> Actually, don't you only want to join the lines if the last line is "="
>> ? (Not otherwise)
>>
>> So, if your input is:
>>
>> long line long line long line long line long line long line long line
>> long line= short line short line short line short line short line short
>> line short line short line long line long line long line long line long
>> line long line long line long line= short line short line short line
>> short line short line short line short line short line
>>
>> The output should be:
>>
>> long line long line long line long line long line long line long line
>> long line short line short line short line short line short line short
>> line short line short line long line long line long line long line long
>> line long line long line long line short line short line short line
>> short line short line short line short line short line
>>
>> So, it should be something like (untested):
>>
>> sub(/=$/," ") { printf("%s",$0);next } 17
>
> The line-len is unimportant, if I use it for TextToSpeech;
> and if I need to read/keep it, I just filter it through <format>
> which folds the lines at the suitable word-break.
>
> ==Thanks.
>
> PS. `which sub` == unknown we use bash not <C is it?>
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
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2015-01-28 19:13 +0000 |
| Message-ID | <mabcd0$ne1$1@news.xmission.com> |
| In reply to | #13500 |
In article <maas5u$ipe$1@dont-email.me>, Joe Beanfish <joebeanfish@nospam.duh> wrote: ... >That's an awk function per your earlier mention of awk. Except it >will only print broken lines. You are wrong. It will print all the lines (both the fixed ones and the unfixed). Go back to school... -- (The Republican mind, in a nutshell) You believe things that are incomprehensible, inconsistent, impossible because we have commanded you to believe them; go then and do what is unjust because we command it. Such people show admirable reasoning. Truly, whoever is able to make you absurd is able to make you unjust. If the God-given understanding of your mind does not resist a demand to believe what is impossible, then you will not resist a demand to do wrong to that God-given sense of justice in your heart. As soon as one faculty of your soul has been dominated, other faculties will follow as well. And from this derives all those crimes of religion which have overrun the world. (Alternative condensed translation) "Those who can make you believe absurdities, can make you commit atrocities".
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2015-01-29 10:53 +0000 |
| Message-ID | <mad3f7$p8t$1@news.xmission.com> |
| In reply to | #13500 |
In article <maas5u$ipe$1@dont-email.me>,
Joe Beanfish <joebeanfish@nospam.duh> wrote:
...
>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.
>
> ORS = sub(/=$/,"") ? " " : "\n"
>
Yup, that's another way to do it in AWK. Good post.
Just to clarify, since this is a shell group, the shell usage of the above
AWK program would be:
gawk 'ORS = sub(/=$/,"") ? " " : "\n"' infile > outfile
Note: I always specify 'gawk' instead of just plain 'awk', because you
never know what you'll get with just plain 'awk'. And lots of vendor AWKs
are, to put it charitably, crippled.
--
Some of the more common characteristics of Asperger syndrome include:
* Inability to think in abstract ways (eg: puns, jokes, sarcasm, etc)
* Difficulties in empathising with others
* Problems with understanding another person's point of view
* Hampered conversational ability
* Problems with controlling feelings such as anger, depression
and anxiety
* Adherence to routines and schedules, and stress if expected routine
is disrupted
* Inability to manage appropriate social conduct
* Delayed understanding of sexual codes of conduct
* A narrow field of interests. For example a person with Asperger
syndrome may focus on learning all there is to know about
baseball statistics, politics or television shows.
* Anger and aggression when things do not happen as they want
* Sensitivity to criticism
* Eccentricity
* Behaviour varies from mildly unusual to quite aggressive
and difficult
[toc] | [prev] | [next] | [standalone]
| From | no.top.post@gmail.com |
|---|---|
| Date | 2015-02-03 05:15 +0000 |
| Message-ID | <maplh5$jfj$1@dont-email.me> |
| In reply to | #13500 |
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> </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.
[toc] | [prev] | [next] | [standalone]
| From | "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> |
|---|---|
| Date | 2015-01-24 00:21 +0100 |
| Message-ID | <5a4c9bc7d1535f5ec1ff42fc4c28c6ce@remailer.privacy.at> |
| In reply to | #13491 |
Kenny McCormack <gaze...@shell.xmission.com> [KM]: KM> Actually, don't you only want to join the lines if the last line is KM> "=" ? (Not otherwise) Joining the lines wasn't part of the OP's requirements (at least as I understood them): Avoid9...@gmail.com <Avoid9...@gmail.com> [A]: A> I vaguely remember mulinux used to do 2-stage-tricks like: A> * translate <EOL> "%" A> * sed-delete "=%"
[toc] | [prev] | [next] | [standalone]
| From | Unknown <dog@gmail.com> |
|---|---|
| Date | 2015-01-27 08:27 +0000 |
| Message-ID | <pan.2015.01.27.08.37.09@gmail.com> |
| In reply to | #13493 |
On Sat, 24 Jan 2015 00:21:46 +0100, Anonymous Remailer (austria) wrote: > Kenny McCormack <gaze...@shell.xmission.com> [KM]: KM> Actually, don't > you only want to join the lines if the last line is KM> "=" ? (Not > otherwise) > > Joining the lines wasn't part of the OP's requirements (at least as I > understood them): > > Avoid9...@gmail.com <Avoid9...@gmail.com> [A]: A> I vaguely remember > mulinux used to do 2-stage-tricks like: A> * translate <EOL> "%" > A> * sed-delete "=%" isn't it obv= ious that yo= don't text w= ritten like this crap! Which can be cleaned by deleting each 2char:"=",EndOfLine
[toc] | [prev] | [standalone]
Back to top | Article view | comp.os.linux.misc
csiph-web