10 More Discussions You Might Find Interesting
1. Solaris
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... (24 Replies)
Discussion started by: guddu_12
24 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have two files, f1 and f2. f1 has 5 columns like so:
a b c d 154
e f g h 365
.....
f2 has two columns, the first column contains the name of the above file and second column contains a constant which is to be used for division.
e.g.
file1 56
I want to divide the 5th... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
3. Shell Programming and Scripting
Hi experts,
I have a list of files containing forces as the only number as follows.
Force1.txt Force2.txt Force3.txt Force4.txt Force5.txt . . . . . . . . . Force100.txt I want to put all the data(only a number ) in these forces files in the file with the same order like 1,2,3 ..100 .... (2 Replies)
Discussion started by: hamnsan
2 Replies
4. 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
5. 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
6. Shell Programming and Scripting
So, I will be working with someone and basically we are trying to build a form that is submitted most likely via the web and the data is just a string of numbers.
like:
19383882872201110929282821818182827349190102837364718191001932873711
Now, each number is part of a numerical value of... (4 Replies)
Discussion started by: tlarkin
4 Replies
7. Shell Programming and Scripting
I need to distinguish between numerical characters in a script:
echo "Enter a number."
read num
if (( $num = * )) ; then
exit 0
fi
this RegX does not work.
Any suggestions? (5 Replies)
Discussion started by: prkfriryce
5 Replies
8. Shell Programming and Scripting
Hi,
How can I remove all non numerical data from line, so I don't want to delete the line but to have only the numbers.
e.g.:
#########
123
aaa124
125bbb
126
127
#########
So I want all the leading and trailing non numerical stuff(letters/white space/tabs anything else except... (10 Replies)
Discussion started by: Juha
10 Replies
9. Programming
Hi I was hoping that maybe someone could help me with a small piece of C code. I have a number of files, which are all of similar layout ie. three lines of text and 5-6 columns of numerical data. I need to add each of the elements of the second column in one file to their counterparts in the second... (17 Replies)
Discussion started by: Boucho
17 Replies
10. 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