tr . tr , char -by- char, .
, sed, ( !). (sed master @Sorpigal , !)
awk
/home/shellter:>cat <<-EOS \
| awk 'BEGIN{RS="\n\n"}; { gsub("\n", "", $0) ;printf("%s %s", $0, "\n\n") }'
The answer t
o your question
A conclusive a
nswer isn’t al
ways possible.
When in doubt, ask pe
ople to cite their so
urces, or to explain
Even if we don’t agre
e with you, or tell y
ou.
EOS
The answer to your question
A conclusive answer isnt always possible.
When in doubt, ask people to cite their sources, or to explain
Even if we dont agree with you, or tell you.
, , dbl-.
Awk , , , , ..
RS = RecordSeperator -- normally a line of data, but a configurable value, that when set
to '\n\n' means a blank line, or a typical separation on a paragraph
$0 = complete line of text (as defined by the internal variables RS (RecordSeparator)
In this problem, it is each paragraph of data, viewed though
as a record.
$1 = first field in text (as defined by the internal variables FS (FieldSeparator)
which defaults to (possibly multiple) space chars OR tab char
a line with 2 connected spaces chars and 1 tab char has 3 fields)
NF = Number(of)Fields in current line of data (again fields defined by value of FS as
described above)
(there are many others, besides, $0, $n, $NF, $FS, $RS).
you can programmatically increase values like $ 1, $ 2, $ 3 using a variable like in the code example, for example $ i (i is a variable that has a number from 2 to NF. says it gives me the value of the i field (i.e. $ 2, $ 3, $ 4 ...)
Hope this helps.