> From owner-freebsd-questi...@freebsd.org Sun May 20 11:11:00 2012 > Date: Sun, 20 May 2012 12:08:04 -0400 > From: Tim Dunphy <bluethu...@gmail.com> > To: freebsd-questions <freebsd-questions@freebsd.org> > Subject: eliminate character with sed > > Hello list, > > I have a few php config files that have the windows delimiter > character in them ('^M') that I would like to get rid of. I'm trying > to use sed to do it, and for some reason I am not having any luck. > > Here's the line that I'm trying to use: > > #sed -i '.bak' 's/^M//g' config.php ^^ ||
I strongly suspect that you are typing '^M' as _two_ characters, literally a "^" and an "M". _THAT_ won't work. <wry grin> You need to type a "[CTL]V", followed by a [CTL]M, to get the right magic in the sed command HOWEVER, it is far easier to simply use: tr -d "\r" <original >new _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"