#!/bin/bash ## convert textfile to DOS-format, i.e. replacing ^J with ^M^J; by Eugene Reimer 2000-Jan; CR=$'\x0d' sed "s/^\(.*\)$CR$/\1/; s/^.*$/&$CR/" exit 2005may: forked; copytodos remains the 2-opnd form for my EXPORT scripts; chgtodosfile is the chgsed version; 2005jun: avoid adding extra CRs to lines already having CR, so harmless to use more than once; 2008feb: forked again; todosfile is a filter; CONSIDER: also using expand, to convert tabs to spaces??