RE: unwanted Carriage Returns in file

RE: unwanted Carriage Returns in file

 

  

If your FTPing from a PC to a UNIX box use binary mode. Ascii mode attaches chr(13)s to the end of each line. If you were viewing it with notepad and it looked "OK" then it probably already had the carriage returns in it. One way to lose the <CR>s (Unix) is:

tr -d '\n' <infile >outfile
or
tr -d '015' <infile >outfile



-----Original Message-----
From: Dustin Hayden
[mailto:oracledba-ezmlmshield-x25862431.[Email address protected]
Sent: Friday, July 28, 2006 4:30 AM
To: LazyDBA Discussion
Subject: RE: unwanted Carriage Returns in file


Use ascii mode when doing the ftp.
Just type asc at the ftp prompt and then put the file.


-----Original Message-----
From: Steven
[mailto:oracledba-ezmlmshield-x34074837.[Email address protected]
Sent: Friday, July 28, 2006 7:16 AM
To: LazyDBA Discussion
Subject: unwanted Carriage Returns in file

Hi;

I am on a PC running windows 2000 Professional.

I am transferring a notepad, "blah_blah_blah.txt", file to a production
server using "psftp".

The command(s) I use is/are :

On the PC : Start Run cmd



At the DOS prompt : psftp -l gbank blahukblahe108 -P 16

Prompt for "password :" , and then respond "*********"

At the "psftp" prompt :

put c:\Map_Load\blah_blah_blah.txt
/u01/staff/gbank/Lower_Directory/blah_blah_blah.txt

All this looks to work OK; *BUT* ...........

When we load the data, in the file, into the database, and then try to
use it, we get issues.

The issues being that the "psftp" transfer put carriage returns at the
end of every line!

Early reading on "psftp", one of the only 2 authorized tools for
accessing the live server,
suggests that it can only transfer files in binary, so we would not
expect carriage returns
to be inserted.

Has anyone any ideas on what is happenning, or what I am doing wrong?

Note: I am not alllowed "telnet" access to the server, so I cannot "vi"
the file to strip out
the carriage returns.

Thanks, in advance

Steve


This email and any files attached are intended for the addressee and may
contain information of a confidential nature. If you are not the
intended recipient, be aware that this email was sent to you in error
and you should not disclose, distribute, print, copy or make other use
of this email or its attachments. Such actions, in fact, may be
unlawful. In compliance with the various Regulations and Acts, General
Dynamics UK Limited reserves the right to monitor (and examine for
viruses) all emails and email attachments, both inbound and outbound.
Email communications and their attachments may not be secure or error-
or virus-free and the company does not accept liability or
responsibility for such matters or the consequences thereof. Registered
Office: 100 New Bridge Street, London EC4V 6JA. Registered in England
and Wales No: 1911653.


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us


Oracle LazyDBA home page