Sponsored Content
Top Forums Shell Programming and Scripting Reading hex data from assembler Post 302407761 by SFNYC on Friday 26th of March 2010 10:33:41 AM
Old 03-26-2010
Quote:
Originally Posted by vbe
Have you tried dd with conv=ascii ?
This method will not work if the file has comp and comp-3 fields.

There is a Perl Module that should be able to do it for you.

Convert::IBM390 - search.cpan.org
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Column data reading

Experts I am new to UNIX shell programming ( or scripting). My problem is that I have an ASCII file in which column wise data is present, the columns are seperated by spaces. I want to read each columns data and store it in arrays, next I will be using the arrays to perform some numerical... (1 Reply)
Discussion started by: FarhanNaseer
1 Replies

2. UNIX for Advanced & Expert Users

hex data conversion

Dear friends, I have hexadecimal data like this. now i want to read each letter and convert to decimal format. for example.: from the below data first i have to read hex data 0 and convert to 4 bit decimal value ie 0000. similarly second letter 8 decimal value is 1000. like this.... (6 Replies)
Discussion started by: rajan_ka1
6 Replies

3. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

4. Programming

reading reading data from webpage

hi iam reading data from web page using request socket and curl socket. now my problem is some the web page containg data as a image so how can i read the data from a image. thank,inadvance. sree (3 Replies)
Discussion started by: phani_sree
3 Replies

5. Programming

How to use assembler (as) in UNIX? [I got errors using assembler]

Hi, folks, I have a simple program main.c. The program is very simple, just for testing purpose. The program was proven correct by using "gcc". Now I would compile it step by step from main.c to main.o. Here is what I did: cpp main.c main.i <This step succeeded> cc main.i -o... (5 Replies)
Discussion started by: meili100
5 Replies

6. Programming

Data formating using C programm with Hex deciamal 'x0d'

:b:Guys, Can some body throw some light on this please..... sprintf(req_line1, "%c%s%c", '\x0b',"TESTING1",'\x0d'); sprintf(req_line2, "%s%c", "TESTING2", '\x0d'); sprintf(req_line3, "%s%c", "Testing3", '\x0d'); sprintf(req_line4, "%s%c%c%c", "Testing4", '\x0d', '\x1c', '\x0d'); ... (6 Replies)
Discussion started by: sudharma
6 Replies

7. Programming

After converting the hexstr to Hex and storing the Hex in a char*

Hi All, My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ',' This has to be done for all the hexstring char* is NULL. Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies

8. Programming

What is the difference between ios::hex and std::hex?

Hi, Is there really a difference between these two, std::hex and ios::hex?? I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true? Thanks (0 Replies)
Discussion started by: royalibrahim
0 Replies

9. Shell Programming and Scripting

how to get data from hex file using SED or AWK based on pattern sign

I have a binary (hex) file I need to parse to get some data which are encoded this way: .* b4 . . . 01 12 .* af .* 83 L1 x1 x2 xL 84 L2 y1 y2 yL By another words there is a stream of hexadecimal bytes (in my example separated by space for better readability). I need to get value stored in... (3 Replies)
Discussion started by: sameucho
3 Replies

10. Shell Programming and Scripting

Reading in data that has spaces in it.

I have a csv file called template.csv which has the following data Name, Age, Height Jessica Jesse, 18, 150 Now what I want to do is use a shell script to read the name age and height which looks like this: #!bin/sh INPUT='template.csv while read Name Age Height do echo... (2 Replies)
Discussion started by: JSNY
2 Replies
hex(3trf)																 hex(3trf)

NAME
hex - Encoding "hex" SYNOPSIS
package require Tcl ?8.2? package require Trf ?2.1.3? hex ?options...? ?data? DESCRIPTION
The command hex is one of several data encodings provided by the package trf. See trf-intro for an overview of the whole package. This encoding transforms every byte in the input into a sequence of 2 characters containing the hexadecimal representation of the byte. For example % hex -mode encode Z 5A hex ?options...? ?data? -mode encode|decode This option has to be present and is always understood by the encoding. For immediate mode the argument value specifies the operation to use. For an attached encoding it specifies the operation to use for writing. Reading will automatically use the reverse operation. See section IMMEDIATE versus ATTACHED for explana- tions of these two terms. Beyond the argument values listed above all unique abbreviations are recognized too. Encode converts from arbitrary (most likely binary) data into the described representation, decode does the reverse . -attach channel The presence/absence of this option determines the main operation mode of the transformation. If present the transformation will be stacked onto the channel whose handle was given to the option and run in attached mode. More about this in section IMMEDIATE versus ATTACHED. If the option is absent the transformation is used in immediate mode and the options listed below are recognized. More about this in section IMMEDIATE versus ATTACHED. -in channel This options is legal if and only if the transformation is used in immediate mode. It provides the handle of the channel the data to transform has to be read from. If the transformation is in immediate mode and this option is absent the data to transform is expected as the last argument to the transformation. -out channel This options is legal if and only if the transformation is used in immediate mode. It provides the handle of the channel the generated transformation result is written to. If the transformation is in immediate mode and this option is absent the generated data is returned as the result of the com- mand itself. IMMEDIATE VERSUS ATTACHED
The transformation distinguishes between two main ways of using it. These are the immediate and attached operation modes. For the attached mode the option -attach is used to associate the transformation with an existing channel. During the execution of the com- mand no transformation is performed, instead the channel is changed in such a way, that from then on all data written to or read from it passes through the transformation and is modified by it according to the definition above. This attachment can be revoked by executing the command unstack for the chosen channel. This is the only way to do this at the Tcl level. In the second mode, which can be detected by the absence of option -attach, the transformation immediately takes data from either its com- mandline or a channel, transforms it, and returns the result either as result of the command, or writes it into a channel. The mode is named after the immediate nature of its execution. Where the data is taken from, and delivered to, is governed by the presence and absence of the options -in and -out. It should be noted that this ability to immediately read from and/or write to a channel is an historic artifact which was introduced at the beginning of Trf's life when Tcl version 7.6 was current as this and earlier versions have trouble to deal with characters embedded into either input or output. SEE ALSO
ascii85, base64, bin, hex, oct, otp_words, quoted-printable, trf-intro, uuencode KEYWORDS
bin, encoding, hex, oct COPYRIGHT
Copyright (c) 1996-2003, Andreas Kupries <andreas_kupries@users.sourceforge.net> Trf transformer commands 2.1.3 hex(3trf)
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy