Binary file conversion


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Binary file conversion
# 1  
Old 01-10-2006
Binary file conversion

All,

I want to convert multiple \0 005 characters to line feed 012 character
in a binary file to make to readable. Here is the sample od -c file
output:

0000000 254 355 \0 005 s r \0 * c o m . c i s c

Here is the sample od -b file output:

0000000 254 355 000 005 163 162 000 052 143 157 155 056 143 151 163 143

Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Conversion of Binary csv file

Hello, I have a binary csv file that was created on 'Red Hat Enterprise Linux Server release 6.6'. Now we have transferred all files on Ubuntu 16.04.2 LTS/xenial On opening the file in Ubuntu, there are special characters ... (8 Replies)
Discussion started by: nans
8 Replies

2. Shell Programming and Scripting

File conversion from Binary to ASCII though UNIX command

Hi All , I have a mainframe file which contains the data in EBCDIC format.I have downloaded this file from mainframe to windows in binary format(unreadable raw data).Now I want convert this file to ASCII format(readable format data) through Unix command.I have tried iconv but that is not working... (2 Replies)
Discussion started by: STCET22
2 Replies

3. Shell Programming and Scripting

Conversion from Hexadecimal to binary

How can I convert hexadecimal values to Binary from the second field to the end Input: WS-2 23 345 235 DT-3 45 4A3 000 pp-2 76 300 E4 Output: WS-2 100011 1101000101 1000110101 DT-3 1000101 10010100011 000 pp-2 1110110 1100000000 11100100 (16 Replies)
Discussion started by: aydj
16 Replies

4. Shell Programming and Scripting

Hexadecimal to Binary conversion

Hi Guys, Is it possible to convert the hexadecimal to Binary by unix command.....I could not figure out.... If I need to convert AF6D to binary...what could be the way to do? Thanks in advance!! ---------- Post updated at 02:57 AM ---------- Previous update was at 02:42 AM ---------- I... (6 Replies)
Discussion started by: Indra2011
6 Replies

5. Solaris

binary conversion

Why would a binary which was compiled on a Solaris-10 not be runnable in a SunOS 5.10? (they are supposed to be precisely equivalent). When I run the file command on it, it says: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information available... (10 Replies)
Discussion started by: steve701
10 Replies

6. Shell Programming and Scripting

binary to ascii conversion

Hi, I have got a library file, created by compiling C code. The file information with "file" command, gives it a "application/x-archive" type file. I want to extract the release string of my software from this file, so that i can know which version of C files were used to create the lib. Can... (3 Replies)
Discussion started by: atulmt
3 Replies

7. Shell Programming and Scripting

binary file conversion

Hello folks, i have a binary text file but i am not able to convert into text format, please suggest. thanks. (2 Replies)
Discussion started by: learnbash
2 Replies

8. Programming

Binary conversion function

Is/are there any function(s) in C that convert(s) character/ASCII/Decimal to binary and vice versa? what about bcopy and strcpy? (1 Reply)
Discussion started by: Peevish
1 Replies

9. SCO

ascii to binary conversion in sco 5.0.5

Here is what I did . . . . I FTP'd several *.dbf zipped files from a SCO 5.0.5 server to winXP machine, and did not set the transfer mode to BIN, now when i was uncompressing these files in SCO 5.0.5 , it was giving "Bad Decode Table error. Is there a way to convert the *.dbf.Z files to Binary so... (1 Reply)
Discussion started by: sameek1211
1 Replies

10. UNIX for Dummies Questions & Answers

Binary data to text file conversion

Dear Sir; i want to know how the binary data convert to text file or readablw format (ASCII).If possible pl. help me for the software and where it is available for download. i.e. (1 Reply)
Discussion started by: auro123
1 Replies
Login or Register to Ask a Question
PMNUMBERSTR(3)						     Library Functions Manual						    PMNUMBERSTR(3)

NAME
pmNumberStr, pmNumberStr_r - fixed width output format for numbers C SYNOPSIS
#include <pcp/pmapi.h> const char *pmNumberStr(double value); char *pmNumberStr_r(double value, char *buf, int buflen); cc ... -lpcp DESCRIPTION
pmNumberStr returns the address of a 8-byte buffer that holds a null-byte terminated representation of value suitable for output with fixed width fields. The pmNumberStr_r function does the same, but stores the result in a user-supplied buffer buf of length buflen, which should have room for at least 8 bytes. The value is scaled using multipliers in powers of ``one thousand'' (the decimal ``kilo'') and has a bias that provides greater precision for positive numbers as opposed to negative numbers. The format depends on the sign and magnitude of value as follows (d represents a decimal digit): +----------------------------------+---------+ | value range | format | +----------------------------------+---------+ | > 999995000000000 | inf? | |999995000000000 - 999995000000 | ddd.ddT | | 999995000000 - 999995000 | ddd.ddG | | 999995000 - 999995 | ddd.ddM | | 999995 - 999.995 | ddd.ddK | | 999.995 - 0.005 | ddd.dd | | 0.005 - -0.005 | 0.00 | | -0.005 - -99.95 | -dd.dd | | -99.995 - -99995 | -dd.ddK | | -99995 - -99995000 | -dd.ddM | | -99995000 - -99995000000 | -dd.ddG | | -99995000000 - -99995000000000 | -dd.ddT | | < -99995000000000 | -inf? | +----------------------------------+---------+ At the boundary points of the ranges, the chosen format will retain the maximum number of significant digits. NOTES
pmNumberStr returns a pointer to a static buffer and hence is not thread-safe. Multi-threaded applications should use pmNumberStr_r instead. SEE ALSO
printf(3) Performance Co-Pilot PCP PMNUMBERSTR(3)