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
pydhcp(8)							     PYDHCPLIB								 pydhcp(8)

NAME
pydhcp - a dhcp command line tool USAGE
pydhcp --input <TYPE;OPTIONS;NAME> --output <TYPE;OPTIONS;NAME> DESCRIPTION
pydhcp is a command line tool to read or write dhcp packet on network, and translate from raw data to human readable informations (and vice-et-versa). pydhcp is a part of the pydhcplib python library. Input and Output field description pydhcp takes an input and an output argument. Input and output are described in the same way. For example : pydhcp --input 'device;binary|up;eth0:68' --output 'file;readable;myfile.txt' -c 1 <TYPE> field There is 5 types for the <TYPE> field. Only one type at once can be used : device, address, file, stdin and stdout. device tells pydhcp to write or listen directly on the network interface and port. address is to write or listen on a specific Internet Address and port (like 192.168.1.1:67 ). file read or write data from or to a file. stdin read data from stdin, stdout write data on stdout. <OPTIONS> field You can use multiple options in the option field by separate them with a pipe |. There is 4 options for this field : readable, binary, up and noup. readable id to read or write data in a human readable language : a packet definition language. This language is described later. Binary form stand for reading or writing packets in the same binary form they are on the network : an UDP packet. readable and binary are mutually exclusive. Option up tells pydhcp to set the network interface up if not. noup tells not to set up the interface. up and noup are only useful in combination with the device type. Default is noup. <NAME> field Describe the name of the device (eth0:67,wlan0:client) , the address (192.168.1.1), or the filename (foo.txt). You can use a port number or the keywords client and server for standard dhcp port. Other command line options of pydhcp Option -c : Number of packet to read or write. 0 for unlimited number of packet. Default is 0. Known limitations - Only one dhcp packet per file, then count is set to 1 for file I/O - No readable transfert on network (address or device). Binary only. -c|--count Number of packets to process. EXAMPLES
Read a client packet on any address and write it on a human readable file : pydhcp -i "address;binary;0.0.0.0:67" -o "file;readable;myfile.bin" Read a binary dhcp packet from a file and print it on stdout in a human readable form : pydhcp -i "file;binary;myfile.bin" -o "stdout;readable;" SEE ALSO
pydhcplib BUGS
Many... AUTHOR
Mathieu Ignacio (mignacio[AT]april.org) pydhcp(8)