Hi, how can i write a C program in Red Hat 9. I can't find a compiler.
Also would you mind looking at this code and telling me if you think its ok. I need to put a file which has many columns of data (of which i only need the first two) into an array, so that i can add it to another such file. This is prob very basic, but C is a bit of a mystery to me and i'm only beginning to find my way.
What do you reckon? How can i show if this worked, would some simple printf command work? Oh, and to put the final array back into a file? Is that just fprintf? Thanks very much for any help you can provide.
1. the gcc compiler is distributed as part of RH. try:
2. Do not use void main() - it is int main()
3. the loop will not work to read a file
so many more errors.... On second thought, you need a C book. try Herbert Schild's book 'Complete C Reference' or one of the SAM's books on C.
As for your problem - it can be done in a few lines of awk code.
newfile will have the first two columns of myfile.
After running
integrity -e
( may not have done this code thing correctly )
I got the following
.io/bootdisk/boot group root should be backup
mode 0600 should be 0440
.io/bootdisk/swap group root should be mem
... (3 Replies)
ok, so here is the issue, I have 2 arrays.
I need to be able to create a loop that will find ${ARRAY1 in the text doc, and replace it with ${ARRAY2 then write the results. I already have that working. The problem is, I need it to do that same result across however many items are in the 2... (2 Replies)
I have 3 variables , $file =abc_2011_11_01.txt (current day file), $back = Yes and $forward = No
I need to search for 3 days back files / 3 days forward files if my current file is not present
logic is,
I need to download the current day file.
If it is missing, i need to look out for currentday... (4 Replies)
Hi everyone
I have one question about using array in perl. let say I have several log file in one folder.. example
test1.log
test2.log
test3.log
and the list goes on..
how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
I have a control file which looks like this
LOAD DATA
INFILE '/array/data/data_Finished_T5_col_change/home/oracle/emp.dat'
PRESERVE BLANKS
INTO TABLE SCOTT.EMP
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(.................
..................)
How can i edit the... (1 Reply)
Hi,
Can any one tell me how to restore back the deleted file in unix?
I know the file name.
If i know the inode number of the file does help more to restore back the file? (1 Reply)
Hi every body,
Is it possible to connect two servers Back-to-Back (Point-to-Point) using HBA adapters & using Fiber.
Note it is direct connection & there is no switches between the servers.
I'm concern about using HBA adapters, it is possible or not.
Thanks in advance. :) (3 Replies)
Hi
I have to delete 18 characters from my file names from back side.
i mean if file name is abcde123456
then i have to delete 6 characters from back and i need file name as abcde.
Please help (4 Replies)