Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #13500
| From | Joe Beanfish <joebeanfish@nospam.duh> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: DeMime M$hit ? |
| Date | 2015-01-28 14:36 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <maas5u$ipe$1@dont-email.me> (permalink) |
| References | <m9r28i@dont-email.me> <1d4f3c4014beabd37a374f3248511b34@remailer.privacy.at> <m9u2qn$r0h$1@news.xmission.com> <pan.2015.01.27.08.36.51@gmail.com> |
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
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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