On Mon, 26 Mar 2007 21:41:39 -0400 thad <[EMAIL PROTECTED]> wrote: > Earlier an Oracle DBA asked me to install unix2dos for AIX because he > has problem scripts written in windows with ^M trailings. I told him > to use vi instead, cut and insert his windows written scripts and if > he has trailing problem with ^M do a :%s/^M//g
Why use vi when he could far more easily do the same with sed? Would be a lot faster too, especially if the files are in any way large: sed -e 's/\r$//' doslineending-file >unixlineending-file To go the other way: sed -e 's/$/\r/' unixlineending-file >doslineending-file -- 夏草や兵どもが夢が跡。。。 http://stormwyrm.blogspot.com
signature.asc
Description: PGP signature
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

