Home » Infrastructure » Unix » who active the comand dos2unix in unix
icon5.gif  who active the comand dos2unix in unix [message #169794] Fri, 28 April 2006 13:59 Go to next message
kespinoza97
Messages: 6
Registered: April 2006
Location: Panama
Junior Member
I have a problem, I need to load data to ORACLE in this format .txt
DFASD|SIOFSF|34JKJ|^MRERWR|RERE|SDFSDF|^MDKFSDF|992K|JSFSD

This block it has several followed records or registry , that is the sign ^M is a end of record but when load the data ,it created as 1 single registry and does not have to be must create 3 registries because the sign ^M me does not recognize it like end of record.
MY QUESTION:
That steps I must do so that my CTL (control file) understands when raising the data that the sign ^M is a end of record and creates the following registry.. PLEASE,,,
Re: who active the comand dos2unix in unix [message #170145 is a reply to message #169794] Tue, 02 May 2006 05:57 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

Remove this ^M character. Follow the link

http://www.tech-recipes.com/unix_tips150.html

Re: who active the comand dos2unix in unix [message #170231 is a reply to message #170145] Tue, 02 May 2006 15:43 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
http://www.freebsddiary.org/control-m.php

I've used dos2unix on Solaris and col on HP to do this. You can dump your files using od to see the difference.

/tmp>>col < in.txt > out.txt
/tmp>>od -c in.txt          
0000000   l   i   n   e   1  \r  \n   l   i   n   e   2  \r  \n   l   i
0000020   n   e   3  \r  \n
0000025
/tmp>>od -c out.txt
0000000   l   i   n   e   1  \n   l   i   n   e   2  \n   l   i   n   e
0000020   3  \n
0000022

[Updated on: Tue, 02 May 2006 15:44]

Report message to a moderator

Previous Topic: installation of de network driver card on the server HP
Next Topic: jdk 1.3.1
Goto Forum:
  


Current Time: Thu Mar 28 04:45:28 CDT 2024