>Somewhere in the dank recesses of my mind, I recall
>a utility that would strip the extra ^M's from a
>text file copied to a unix box. Well, it seems that
>Linux also considers these ^M's extranious, is there
>such a standard utility or do I have to dig even
>deeper to remember sed/awk/grep comma
On Thu, 5 Jun 1997, Curt Howland wrote:
> Somewhere in the dank recesses of my mind, I recall a utility that
> would strip the extra ^M's from a text file copied to a unix
> box. Well, it seems that Linux also considers these ^M's extranious,
> is there such a standard utility or do I have to dige
-BEGIN PGP SIGNED MESSAGE-
On Thu, 5 Jun 1997, Curt Howland wrote:
> Somewhere in the dank recesses of my mind, I recall
> a utility that would strip the extra ^M's from a
> text file copied to a unix box. Well, it seems that
> Linux also considers these ^M's extranious, is there
> such a
On Thu, 5 Jun 1997, Curt Howland wrote:
>
> Somewhere in the dank recesses of my mind, I recall
> a utility that would strip the extra ^M's from a
> text file copied to a unix box. Well, it seems that
> Linux also considers these ^M's extranious, is there
> such a standard utility or do I have to
Here's a sed script that I've used for years on my old SCO Unix box. I'm
not actually positive it works on Linux because I haven't tried it, but sed
is sed, right?...
It adds ^M's if they're missing and deletes them if found. (i.e. one
script that will do both conversions)
sed -e '
s-^M--g
t
s+
Dale Scheetz:
> The seesat5 package (a satellite tracking program) provides a little
> program called "cr" that will convert text files from DOS style carriage
> returns to Unix ones and back. Seesat5 needs the facility to incorporate
> DOS generated element files on the Linux file system without t
Curt Howland wrote:
>
> Somewhere in the dank recesses of my mind, I recall
> a utility that would strip the extra ^M's from a
> text file copied to a unix box. Well, it seems that
> Linux also considers these ^M's extranious, is there
> such a standard utility or do I have to dig even
> deeper to
tr -d '\r' < dosfile > unixfile
removes all ^Ms, even if they are not at the end of the line
where MSDOS seems to put them. tr(1) is small and fast.
perl -p -i.bak -e 's/\r$//;' dosfile
renames the dosfile dosfile.bak and writes the corrected
output in dosfile. The $ "anchors" the search
On Thu, 5 Jun 1997, Curt Howland wrote:
>
> Somewhere in the dank recesses of my mind, I recall
> a utility that would strip the extra ^M's from a
> text file copied to a unix box. Well, it seems that
> Linux also considers these ^M's extranious, is there
> such a standard utility or do I have to
In message <[EMAIL PROTECTED]>, writes:
>
>Somewhere in the dank recesses of my mind, I recall
>a utility that would strip the extra ^M's from a
>text file copied to a unix box. Well, it seems that
>Linux also considers these ^M's extranious, is there
>such a standard utility or do I ha
install the 'recode' package
and use it like this :
recode ibmpc:latin1 YourTextFile
Bye,
Alexandre
On Thu, 5 Jun 1997, Curt Howland wrote:
>
> Somewhere in the dank recesses of my mind, I recall
> a utility that would strip the extra ^M's from a
> text file copied to a unix box. Well, it seem
11 matches
Mail list logo