[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs
From: |
Ralph Corderoy |
Subject: |
Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs |
Date: |
Sat, 26 May 2018 12:04:27 +0100 |
Hi Tom,
> > sed 's/$/\n/' "$@" |
>
> Another idiom is: sed -eG.
Oh yes, that's better.
> > fmt -su |
>
> Interesting switches for fmt.
Well, I thought you could play around with what you prefer.
It's GNU fmt, which has annoying behaviour. Bring back _Software Tools_!
$ yes foo | fmt -60 | uniq -c | sed 3q
67 foo foo foo foo foo foo foo foo foo foo foo foo foo foo
3 foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
67 foo foo foo foo foo foo foo foo foo foo foo foo foo foo
$
The `-u' doesn't turn `foo. Bar' into two spaces, just shortens multiple
spaces to one or two, unfortunately. On the other hand, `e.g. gripper'
would then need fixing up.
$ fmt -u
Apple banana cherry. Doughnut eclair.
^D
Apple banana cherry. Doughnut eclair.
$
I've ~/bin/owpl, one word per line, and fmt does know to use two spaces
when joining lines of different sentences.
$ owpl | fmt
Distinct. Lack. Of. Spaces.
^D
Distinct. Lack. Of. Spaces.
$
> > cat -s
This can be sed too, and it irks to be using an option to cat(1) :-)
But I go for ease over recall.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
- [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, nmh, 2018/05/23
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ralph Corderoy, 2018/05/23
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ken Hornstein, 2018/05/23
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, nmh, 2018/05/23
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ken Hornstein, 2018/05/23
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, David Levine, 2018/05/23
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, nmh, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ralph Corderoy, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, nmh, 2018/05/25
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs,
Ralph Corderoy <=
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ken Hornstein, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, David Levine, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ken Hornstein, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, David Levine, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ken Hornstein, 2018/05/24
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Andy Bradford, 2018/05/25
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ralph Corderoy, 2018/05/25
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Michael Richardson, 2018/05/25
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Ralph Corderoy, 2018/05/26
- Re: [nmh-workers] post 1.71 ug: "long line"/single newline paragraphs, Anthony J. Bentley, 2018/05/26