On Thu, Nov 15, 2012 at 7:45 PM, MJ Ray mjr@phonecoop.coop wrote:
James Freer jessejazza3.uk@gmail.com
[...] Joe does all i want other than coping with long lines. [I seem to recall a discussion about editors a few years ago and someone on here uses Joe]. Point is i want to save in long line form but view and edit in wrapped form - just like one does in gedit or leafpad. [...]
Why?
To view a wrapped file as unwrapped:
sed -ne 'H;/^$/{;x;s/\n/ /g;p;}' filename
or for some files, this will suffice and leave more gaps:
fmt -w2500 filename
Hope that helps,
MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op.
Ah... i read the info on sed when i was in synaptic a few evenings ago but wasn't sure. I'm not a computer geek. Many thanks for the guidance and i'll give the sed docs a read. Hopefully it's not too involved otherwise i might as well switch to vim.
james