Up Prev Next
From: delsolar at lehman dot com (William del Solar)
Subject: Re: Control Characters in a Pattern
Date: Feb 22 1996 6:40PM
Subbarao Chitturi wrote:
I know that this is a sybperl list, but the problem you describe is not
a sybperl specific problem.
> How can I remove control characters in a string?
On Unix, type "man tr". tr "translates" one set of characters into
If that is not enough, type "man sed". sed is a "stream editor" which
is useful for cleaning up soiled files.
You may also want to type "man ed" to understand a bit more about sed.
On SunOS, try typing "man dos2unix" and "man unix2dos". On my SunOS
4.1.3 box, they are both in /bin. Those two programs will only strip
and add carriage returns (^M) at the of each line respectively.
> I created a data file on my PC and ftpd the file to the UNIX ...
The ftp program can function in two modes: ascii and binary.
If you are seeing carriage returns at the ends of lines in vi, that
means that you are probably using ftp in binary mode. After you
establish an ftp connection, type "ascii" to make sure that you are
not in the binary file transfer mode.
Bill del Solar * Lehman Brothers * firstname.lastname@example.org * 201-524-2108
++ My opinions are mine only. ++