Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting binary file to text file Post 302965063 by jgt on Friday 22nd of January 2016 09:10:54 PM
Old 01-22-2016
This looks like packed decimal to me.
The fields that look like '00 00 00 c6' appear to be cobol S9(7) COMP 3.
And on your machine, the hd program reverses the digits in each byte so that it is probably
0000006c on disk.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting a text file to a csv file

I have a text file that is the output of a Netbackup report. The file it generates is just a plain text file with only white space between fields. For example: Date Policy Type Kilobytes Retention 12/5/2005 WinNT Full 18329948 6 Months I... (4 Replies)
Discussion started by: primowalker
4 Replies

2. UNIX for Dummies Questions & Answers

How to convert binary Unix file to text

Hi all, I have a print control file (dflt) for Oracle which is in binary. As I am going to develope an application in Window environment, I would like to reference the dflt file. But it is in binary format and I cannot access it. Anyone can suggest me how to convert the file into text or... (5 Replies)
Discussion started by: user12345
5 Replies

3. Shell Programming and Scripting

Converting a text file to HTML

Hi, I need to convert a text file formatted like this ("tshark -z conv,ip" output) to HTML: ===================================================================================================== IPv4 Conversations Filter:<No Filter> | <- ... (4 Replies)
Discussion started by: ph0enix
4 Replies

4. Shell Programming and Scripting

convert binary file into text file

im looking for anothr way to convert binary file into text file im using old solaris version (exatcly like xxd -r) thanks (2 Replies)
Discussion started by: modcan
2 Replies

5. UNIX for Dummies Questions & Answers

Converting binary file to readable format in Ksh

In Unix/Ksh, when I try to look inside a file it says that the file may be a binary file and if I want to see it anyway. When i say 'yes', it shows me the content filled with unreadable symbols (looks like binary). Is there a command that I can run from the Unix prompt to convert/translate that... (3 Replies)
Discussion started by: arthurs
3 Replies

6. Shell Programming and Scripting

Converting columns of a text file.

Not sure the most effient way to do this. I have figiured out how to extract columns with shell script, but not sure how to convert This is what I have... NEWDNS 04-Jun-2011 06:00:59.762 10.220.136.217 crl.verisign.com This is what I need.... Change date, remove mil seconds,... (1 Reply)
Discussion started by: mrlayance
1 Replies

7. UNIX for Dummies Questions & Answers

Converting a text file with irregular spacing into a space delimited text file?

I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies

8. UNIX for Dummies Questions & Answers

[AIX] Binary file warning for text file.

Hello guys, We had to move from a DC to another, and we are now facing an "issue" with some text files. Looks like that some of our log files are set as binary: file TuxConnectorURA.20121012 TuxConnectorURA.20121012: data or International Language text less TuxConnectorURA.20121012... (2 Replies)
Discussion started by: EnioMarques
2 Replies

9. Shell Programming and Scripting

Converting text file in a matrix

Hi All, I do have a file with many lines (rows) and it is space delimited. For example: I have a file named SR345_pl.txt. If I open it in an editor, it looks like this: adfr A2 0.9345 dtgr/2 A2 0.876 fgh/3 A2 023.76 fghe/4 A2 2345 bnhy/1 A3 3456 bhy A3 0.9876 phy A5 0.987 kdrt A5... (9 Replies)
Discussion started by: Lucky Ali
9 Replies

10. Shell Programming and Scripting

Converting a binary file to ascii and vice versa?

Hi All, I have a binary file which is being exported from a Database, and i need to convert that to ASCII format. How can i achieve that? And this solution should work for any file which is given to us; means they will give different files from different tables. Thanks in advance. (8 Replies)
Discussion started by: baranisachin
8 Replies
NS(3N)																	    NS(3N)

NAME
ns_addr, ns_ntoa - Xerox NS(tm) address conversion routines SYNOPSIS
#include <sys/types.h> #include <netns/ns.h> struct ns_addr ns_addr(cp) char *cp; char *ns_ntoa(ns) struct ns_addr ns; DESCRIPTION
The routine ns_addr interprets character strings representing XNS addresses, returning binary information suitable for use in system calls. ns_ntoa takes XNS addresses and returns ASCII strings representing the address in a notation in common use in the Xerox Development Envi- ronment: <network number>.<host number>.<port number> Trailing zero fields are suppressed, and each number is printed in hexadecimal, in a format suitable for input to ns_addr. Any fields lacking super-decimal digits will have a trailing ``H'' appended. Unfortunately, no universal standard exists for representing XNS addresses. An effort has been made to insure that ns_addr be compatible with most formats in common use. It will first separate an address into 1 to 3 fields using a single delimiter chosen from period (``.''), colon (``:'') or pound-sign (``#''). Each field is then examined for byte separators (colon or period). If there are byte separators, each subfield separated is taken to be a small hexadecimal number, and the entirety is taken as a network-byte-ordered quantity to be zero extended in the high-network-order bytes. Next, the field is inspected for hyphens, in which case the field is assumed to be a number in decimal notation with hyphens separating the millenia. Next, the field is assumed to be a number: It is interpreted as hexadecimal if there is a leading ``0x'' (as in C), a trailing ``H'' (as in Mesa), or there are any super-decimal digits present. It is interpreted as octal is there is a leading ``0'' and there are no super-octal digits. Otherwise, it is converted as a decimal number. SEE ALSO
hosts(5), networks(5), DIAGNOSTICS
None (see BUGS). BUGS
The string returned by ns_ntoa resides in a static memory area. ns_addr should diagnose improperly formed input, and there should be an unambiguous way to recognize this. 4.3 Berkeley Distribution May 12, 1986 NS(3N)
All times are GMT -4. The time now is 09:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy