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 Display Modes
  #1 (permalink)  
Old 02-24-09, 04:32
shileola83 shileola83 is offline
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 02-24-09, 05:28
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,578
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 02-24-09, 05:28
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
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 02-25-09, 04:18
shileola83 shileola83 is offline
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 02-25-09, 05:24
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
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
Reply

Thread Tools
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