Home » Infrastructure » Unix » How tro remove unwanted characters from a flat file (HP Unix, Oracle 10g)
How tro remove unwanted characters from a flat file [message #524564] Sat, 24 September 2011 15:48 Go to next message
Roadies99
Messages: 28
Registered: May 2011
Location: Delhi
Junior Member

I have been provided with a flat file from Hyperion-Essbase, which requires to be loaded to the oracle database.

Location:
The file is located on the Unix machine.

Issue:
The file that has been provided contains not required values Mi#.

Requirement:
1 Is there any command in Unix available that would remove Mi# and replace it with NULL.
2 Is there any command in Unix available that would remove Mi# and replace it with 0.
Re: How tro remove unwanted characters from a flat file [message #524568 is a reply to message #524564] Sat, 24 September 2011 16:32 Go to previous messageGo to next message
BlackSwan
Messages: 21982
Registered: January 2009
Senior Member
Please clarify, what do you mean by "Mi#"?

Can this file be mapped as External Table?

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: How tro remove unwanted characters from a flat file [message #524582 is a reply to message #524568] Sun, 25 September 2011 00:46 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
1 Is there any command in Unix available that would remove Mi# and replace it with NULL.

sed -e 's/Mi#//g' t1 >t2


Quote:
Is there any command in Unix available that would remove Mi# and replace it with 0.

sed -e 's/Mi#/0/g' t1 >t2


Regards
Michel

[Updated on: Sun, 25 September 2011 00:47]

Report message to a moderator

Re: How tro remove unwanted characters from a flat file [message #524798 is a reply to message #524582] Mon, 26 September 2011 15:42 Go to previous message
Roadies99
Messages: 28
Registered: May 2011
Location: Delhi
Junior Member

Thanks.
Previous Topic: sftp multiple files
Next Topic: Create a folder with a script
Goto Forum:
  


Current Time: Thu Apr 24 20:11:42 CDT 2014

Total time taken to generate the page: 0.08774 seconds