bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed for non-DOS files


From: Paul Jarc
Subject: Re: sed for non-DOS files
Date: Mon, 04 Feb 2002 13:18:30 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-redhat-linux-gnu)

Roger Spellman <address@hidden> wrote:
> I'm using GNU on a "Windows" PC.

Actually, you're using someone else's Windows port of GNU.

> I wrote a script using 'sed' to generate some C code.  However, the script
> seems to always Ctrl-M at the end of each line.

The carriage returns may be coming from sed, or may be already present
in sed's input.  Assuming your port of sed does not automatically add
a carriage return to the end of every line, you can strip off the last
character on every line by piping through "sed 's/.$//'".  Or if you
have tr, "tr -d "\015"" might remove all carriage returns.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]