Let my introduce myself and one doubt!!!!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Let my introduce myself and one doubt!!!!
# 1  
Old 10-01-2008
Let my introduce myself and one doubt!!!!

Hello,

My name is John. I am from Spain and I am learning Linux and how to use it.
I hope to learn more in this forum.

I am developing a new application, and I have a doubt:

Can I read a file, line by line, in C programm?

Best regards.
# 2  
Old 10-01-2008
Try using the fgets function in c.

Example below:



Code:
/* Read in the filename */
  printf("Enter the name of a ascii file: ");
  fgets(fname, sizeof(fname), stdin);

 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Doubt

in my shell script requirement is to search and replace the file with variable so i use the following command sed -i "s/abc/$SCHEMA/g" table.sql later when the script runs sqlplus username/pwd@Table& this & is not letting the variable to replace the value inside the file .please let me know... (1 Reply)
Discussion started by: bhuvan1
1 Replies

2. Shell Programming and Scripting

How to introduce the missing number sequentially?

Dear Help, I have an input file which looks like below 002 1000 2000 3000 003 2000 3000 4000 005 1000 2000 6000 I would like to have an output which inserts the missing number in sequential sorting as shown below... 001 0 0 0 002 1000 2000 3000 003 2000 3000 4000 004 0 0 0 005 1000... (5 Replies)
Discussion started by: Indra2011
5 Replies

3. UNIX for Dummies Questions & Answers

Is it possible to introduce a character using sed?

I need to reformat a text using sed command like Text: 160845 Output: 16:08:45 Please help me how this can be done using sed. Thanks in adv (1 Reply)
Discussion started by: siteregsam
1 Replies

4. Solaris

Create files to introduce with ZFS

Hello, To learn ZFS, i try to create pool . and for that i want create 10 files with 512MB (because i dont have multiple disks and multiple controllers) ADMIT THAT THIS IS TEN HIGH-PERFORMANCE HARD DRIVES To get this 10 files,all of them have the same size : 512MB, I do these... (9 Replies)
Discussion started by: herbich1985
9 Replies

5. Shell Programming and Scripting

How to introduce delay in Shell Script till a key stroke.

Hi All, How to introduce delay in the Bash/Shell Script till key stroke. Below is the requirement.. 1.Execute set of commands. 2.Display the message echo "press any key to continue" Introduce a delay till key stroke. 3.Execute next set of commands. Thanks in Advance Sunil.K (5 Replies)
Discussion started by: sunilrk07
5 Replies

6. Shell Programming and Scripting

how to introduce a space in a single column without distrubing the other columns

Hello Experts, I am new to this forum, I would like to do the following changes in one of the column of a txt file, which is having around 9 column. For example, column 3 is having letters like this AB11 AB12 C CA CB AC1 AC2 I would like to convert the same column as follows ... (5 Replies)
Discussion started by: Fredrick
5 Replies

7. Shell Programming and Scripting

Doubt??

I jus want to know the meaning of the below command line(exclamation following that re-direction) sqlplus -s `cat /home/sample.txt` <<! Thanks!! (1 Reply)
Discussion started by: nohup
1 Replies

8. Shell Programming and Scripting

how to introduce delay in the script??(urgent)

Hi all, i would like to know how to introduce a delay in the execution of a cmd? am trying to copy a file which is about 650 mb and then perform some actions on it.. however since its huge i would like to introduce a delay in exection until the process is over i dont want it to proceed to... (10 Replies)
Discussion started by: wrapster
10 Replies
Login or Register to Ask a Question