If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Conversion from binarry to ASCII

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Feb 2009
Posts: 4
Conversion from binarry to ASCII

I need to convert a file in binary form to ASCII form. Can any body help me with the Unix script?
Also, I will appreciate if any body can recommend/be of help on any good book on unix script for a beginner.
Thanks
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,721
How should this conversion be done? Do you want to have the hex representation of the single bytes? You may want to have a look at the "hexdump" tool.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,527
Quote:
Originally Posted by shileola83
I need to convert a file in binary form to ASCII form. Can any body help me with the Unix script?
That tells us nothing about the file. You could try something like the following that will tell us what's in the file :

Code:
head -2 MyFile | od -c
Quote:
Originally Posted by shileola83
Also, I will appreciate if any body can recommend/be of help on any good book on unix script for a beginner.
Thanks
I'd recommend "Unix Programming Environment" by Kernighan but the "Unix in a nutshell" is also good but less inclined towards beginners.
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Feb 2009
Posts: 4
The file is a raw CDR data from from HLR (Home Location Register) that needs to be converted to readable formart .
Thanks
Reply With Quote
  #5 (permalink)  
Old
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,527
The only information I could find on HLR was this. Have you tried asking whoever supplied you with the data how you should read it or what the format it's in?
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 2
Binary file to readable format conversion

We are also facing a similar issue. Was this issue resolved then. We want to convert a ASN.1 binary file into readable one. The command OD doesnt convert the timestamp field appropriately. Any help would be high;y appreciated.

Thanks,
Raju
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Feb 2006
Posts: 169
This is a site that will convert the .cdr file(s):
CONVERT COREL DRAW FILES ONLINE - Free Online File Conversion Services | Filespazz.com
And this with this utility you should be able to view and/or convert them:
CDR Viewer - CNET Download.com
hth
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 2
File conversion

Thanks for the Response.

I am not able to use the utility as it says that the package is corrupted and some files may be missing.

Any other alternate pls.

Thanks,
Raju
Reply With Quote
  #9 (permalink)  
Old
Registered User
 
Join Date: Feb 2006
Posts: 169
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On