in reply to Gentleman, I'm lost.
Update: Of course, the above seems to be long because of the need to echo some sample data for demonstrating the example, but if your input data is in a file named "bible.txt, it boils down to one code line:$ echo "3:3 And he shall offer of the sacrifice of the peace offering +an > offering made by fire unto the LORD; the fat that covereth the > inwards, and all the fat that is upon the inwards, 3:4 And the two > kidneys, and the fat that is on them, which is by the flanks, and th +e > caul above the liver, with the kidneys, it shall he take away. > 3:5 And Aaron's sons shall burn it on the altar upon the burnt > sacrifice, which is upon the wood that is on the fire: it is an > offering made by fire, of a sweet savour unto the LORD. > " | perl -pe 's/[\r\n]+/ /g; s/(\d+:\d+)/\n$1/g;' 3:3 And he shall offer of the sacrifice of the peace offering an offe +ring made by fire unto the LORD; the fat that covereth the inwards, +and all the fat that is upon the inwards, 3:4 And the two kidneys, and the fat that is on them, which is by the + flanks, and the caul above the liver, with the kidneys, it shall he + take away. 3:5 And Aaron's sons shall burn it on the altar upon the burnt sacrif +ice, which is upon the wood that is on the fire: it is an offering m +ade by fire, of a sweet savour unto the LORD.
perl -pe 's/[\r\n]+/ /g; s/(\d+:\d+)/\n$1/g;' bible.txt
|
|---|