Date: Sat, 22 Nov 2003 21:00:26 +0800 From: Zhang Weiwu <weiwuzhang@hotmail.com> To: freebsd-questions@freebsd.org Subject: newbie: use <CR> in RE? Message-ID: <3FBF5DEA.2030405@hotmail.com>
next in thread | raw e-mail | index | archive | help
Hello. Just want to know how to use special character in Regular Expression. I wish to remove all the carrier returns from a text file, I can use: tr -d "\r" < text_file > modified_text_file But if I do: sed -i s/\r//g text_file it actually removes all the character "r" from the file. This is also a problem in vi(1). Besides <CR> I wish to manipulate tabstops and line-feeds with RE too.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FBF5DEA.2030405>