[SATLUG] how to use tr to remove newlines after '--'

Don Davis dondavis at reglue.org
Sat May 29 12:11:25 CDT 2010

I have a file and I'm trying to remove newline characters after lines 
that end with '--'

tr '\-\-\n' '\-\- '
removes _ALL_ new lines not only the ones after '--'
and sed -e 's/--$/foo/g' |tr 'foo\n' ' '
does as well.


More information about the SATLUG mailing list