====== SED - Convert - Convert DOS newlines (CR/LF) to Unix format ====== ===== In UNIX Environments ===== sed 's/.$//' # Assumes that all lines end with CR/LF. sed 's/^M$//' # In bash/tcsh, press Ctrl-V then Ctrl-M. sed 's/\x0D$//' # gsed 3.02.80, but top script is easier. ---- ===== In DOS Environments ===== **NOTE:** Cannot be done with DOS versions of sed. Use "tr" instead. tr -d \r outfile # GNU tr version 1.22 or higher