index RSS main
I read this post on Linux Questions and thought, hey! I'm sure that would be easier on Unix! ;-) Sure enough, one bout of frenetic typing later:
$ cat -v bin/unfill #!/bin/sh #unfill: on a text file where paragraphs are seperated by blank lines, #joins the lines in a paragraph (this is good for posting to web forums, etc) #(I couldn't figure out how to do it just with sed, and this is a bit of a hack, but...) sed 's/^$/^G/' | tr -d '\n' | tr '^G' '\n' $
Invoked from Not The Standard Text Editor like so:
Yes, Virginia, it will break if you have "BELL" characters in your text. But who has "BELL" characters in their text?!
Paul Dunne, Wed May 25 12:30:11 CEST 2016
created with stb