The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
appending space in binary data in c arunkumar_mca High Level Programming 2 02-12-2007 05:30 PM
Binary data to text file conversion auro123 UNIX for Dummies Questions & Answers 1 12-26-2005 02:48 AM
Need to convert Binary files to ascii Reza Nazarian UNIX for Advanced & Expert Users 5 11-05-2004 04:46 PM
read binary data on solaris 9 yanhu SUN Solaris 1 03-22-2004 10:49 AM
Convert ASCII to BINARY pc9456 UNIX for Advanced & Expert Users 2 06-24-2002 03:46 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-04-2004
Registered User
 

Join Date: Aug 2001
Posts: 60
Convert Binary data to ascii data

Friends,

I've tried on solaris, but I could n't get ascii data

dd if=binaryinputfile bs=1 skip=3800 count=4 | od -t u4

output :

INDBU3:/usr/users/FTAMUSER/kk $
dd if=SMP20041006173649188151 bs=1 skip=3800 count=4 | od -t u4
4+0 records in
4+0 records out
0000000 0000000000
0000004


Pls help me to convert binary to ascii on solaris or true64.

Thanks
Krishna
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-04-2004
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
have you tired dos2unix and unix2dos?

freshmeat.net
Reply With Quote
  #3 (permalink)  
Old 11-04-2004
Registered User
 

Join Date: Aug 2001
Posts: 60
Re: Convert Binary data to ascii data

My source file is in Unix Binary formated but I need to be convert in Ascii on Unix, Don't have idea on UnixtoDos or DostoUnix? pls help me out.
Thanks
Reply With Quote
  #4 (permalink)  
Old 11-05-2004
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
they are utilities to convert files to each respective format. if you dont have them installed on your system already, go to freshmeat.net and search for them. they are available for download there.
Reply With Quote
  #5 (permalink)  
Old 11-05-2004
Registered User
 

Join Date: Nov 2004
Location: Mumbai, India
Posts: 14
Krishna,

If you know the data structure of the binary file, you can write a C program to 'fread' the file into a structure and can write into text file.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0