10-19-2015
Reading binary content
Dear Gurus
I am stuck with the peice of work and do not know from where to start.
I get a machine generated file which is binary file contain binary data, i want to read binary data as it is without converting into any other format.
i want to read byte by byte.
Please let me know what unix command will show the content of the binary file in binary format itself.
when i do cat file name then the output looks like below content
zð cH$zp b$zp c$zð b$zð c*$zp b*$zp c¢$zð b¢$zð cF«$zp%+*$zp%*¼$zð%*Á$zð
I want to see in the binary format and read byte by byte.
any help will be greatly appriciated
10 More Discussions You Might Find Interesting
1. Programming
I'm having trouble with reading information back into a program from a binary file. when i try to display the contents of the file i get a Memory fault(coredump). would anyone be able to assist?
this is my fread line fread(&file_data,sizeof(struct book_type),1,fileSave); ive also tried it without... (3 Replies)
Discussion started by: primal
3 Replies
2. Shell Programming and Scripting
Hi,
I've searched and couldn't find anyone else with this problem. Is there anyway (preferably using ksh - but other script languages would do) that I can read in binary float data into a text file. The data (arrays from various stages of radar processing) comes in various formats, but mainly... (3 Replies)
Discussion started by: Jonny2Vests
3 Replies
3. Programming
Hi All,
Please suggest me how to read a binary file in text or ASCII format.
thanks
Nagendra (3 Replies)
Discussion started by: Nagendra
3 Replies
4. Shell Programming and Scripting
Hi,
I am reading a file line by line using read line function of while loop. Each line contains 4 fields. I want to take these 4 values in 4 variables in each iteration so that i can use them in my script. The issue here is that my awk command is returning awkward results -
Here is a sample line... (8 Replies)
Discussion started by: garman
8 Replies
5. Shell Programming and Scripting
Hello.
I've written up a script, that populates a variable with a list of tapes returned from my library. For example:
701940L3,701941L3,701942L3,701943L3,701944L3,701945L3,701946L3,701947L3,701948L3
So now, the variable "TAPELIST" contains those numbers, delimited by commas. I'd like to... (6 Replies)
Discussion started by: Stephan
6 Replies
6. Programming
#include <stdio.h>
/*
typedef struct
{
char name;
int number;
float balance;
} acct_info_t;
*/
int main()
{
FILE *fptr;
fptr = fopen("acct_info", "r");
int magic = 5;
fseek(fptr,3,SEEK_SET);
fread(&magic,sizeof(int),1,fptr);... (7 Replies)
Discussion started by: robin_simple
7 Replies
7. Programming
this is my code and no matter what record number the user enters i cant get any of the records fields to read into the structure acct. What am i doing wrong?
#include <stdio.h>
typedef struct
{
char name;
int number;
float balance;
} acct_info_t;
int main (int... (0 Replies)
Discussion started by: bjhum33
0 Replies
8. Shell Programming and Scripting
Hi ,
i have a parameter which has path of a file. Now i need to have another parameter with the content of that file. I tried the belwo script , can any one please help.
I dont want to use cat command to read. Can we do it with out using cat command.
while read line
do... (9 Replies)
Discussion started by: Ravindra Swan
9 Replies
9. Programming
Hello to all guys,
Maybe some expert could help me.
I have a working ruby script shown below that reads a big binary file (more than 2GB). The chunks of data I want to analyze
is separated by the sequence FF47 withing the binary. So, in the ruby script is defined as "line separator" =... (10 Replies)
Discussion started by: Ophiuchus
10 Replies
10. Programming
is there any unix tools that can read the text files like through SQL queries? (ie in Hadoop, Impala DB support flat file query) (1 Reply)
Discussion started by: omykarshan
1 Replies
egd(3erl) Erlang Module Definition egd(3erl)
NAME
egd - egd - erlang graphical drawer.
DESCRIPTION
egd - erlang graphical drawer
DATA TYPES
color() :
egd_image() :
font() :
point() = {integer(), integer()} :
render_option() = {render_engine, opaque} | {render_engine, alpha} :
EXPORTS
color(Color::Value | Name) -> color()
Types Value = {byte(), byte(), byte()} | {byte(), byte(), byte(), byte()}
Name = black | silver | gray | white | maroon | red | purple | fuchia | green | lime | olive | yellow | navy | blue | teal |
aqua
Creates a color reference.
create(Width::integer(), Height::integer()) -> egd_image()
Creates an image area and returns its reference.
destroy(Image::egd_image()) -> ok
Destroys the image.
filledEllipse(Image::egd_image(), P1::point(), P2::point(), Color::color()) -> ok
Creates a filled ellipse object.
filledRectangle(Image::egd_image(), P1::point(), P2::point(), Color::color()) -> ok
Creates a filled rectangle object.
line(Image::egd_image(), P1::point(), P2::point(), Color::color()) -> ok
Creates a line object from P1 to P2 in the image.
rectangle(Image::egd_image(), P1::point(), P2::point(), Color::color()) -> ok
Creates a rectangle object.
render(Image::egd_image()) -> binary()
Equivalent to render(Image, png, [{render_engine, opaque}]) .
render(Image::egd_image(), Type::png | raw_bitmap) -> binary()
Equivalent to render(Image, Type, [{render_engine, opaque}]) .
render(Image::egd_image(), Type::png | raw_bitmap, Options::[render_option()]) -> binary()
Renders a binary from the primitives specified by egd_image(). The binary can either be a raw bitmap with rgb tripplets or a binary
in png format.
save(Binary::binary(), Filename::string()) -> ok
Saves the binary to file.
text(Image::egd_image(), P::point(), Font::font(), Text::string(), Color::color()) -> ok
Creates a text object.
AUTHORS
<>
percept 0.8.5 egd(3erl)