[oclug] sed/tr question

Patrick Smith patsmith at pobox.com
Thu Mar 17 23:27:16 EST 2005


hdc at fs.ca wrote:
> I need to combine these lines into a single line (and then perform other 
> manipulations on the data), so I am trying to use sed and/or tr to remove the 
> CR/LF combination.  

tr -d '\r\n' < file > newfile

Or, with an older tr that doesn't recognize those escape codes,

tr -d '\15\12' < file > newfile


More information about the OCLUG mailing list