On Fri, Jun 23, 2000 at 06:04:14AM -0600, SoloCDM wrote:
> I successfully used "cat <file> | tr -d '\n'" on a file that "sed
> 's/\n//g' <file>" failed to properly recognize.  I need sed to
> effectively recognize newlines or ask that someone provide a perl
> script that will.
 
I'm not sure what you're trying to accomplish, but Perl's chomp() function
seems to do a good job of removing various line-ending encodings.  This 
one-liner translates from foriegn to native newlines:

    $ perl -i.bak -ne 'chomp; print"$_\n"' somefile more*files

-- 
Ken Irving
Trident Software
[EMAIL PROTECTED]


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to