Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

feof(3) [osf1 man page]

feof(3) 						     Library Functions Manual							   feof(3)

NAME
feof - Tests EOF on a stream LIBRARY
Standard C Library (libc) SYNOPSIS
#include <stdio.h> int feof( FILE *stream); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: feof(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the input stream. DESCRIPTION
The feof() function tests the EOF (end-of-file) condition on the specified stream. NOTES
[Tru64 UNIX] The feof() function may be a macro (depending on the compile-time definitions used in the source). Consequently, you cannot use this interface where a function is necessary; for example, a subroutine pointer cannot point to it. RETURN VALUES
If EOF has previously been detected reading the input stream specified by the stream parameter, a nonzero value is returned. Otherwise, a value of 0 (zero) is returned. RELATED INFORMATION
Functions: ferror(3), fileno(3), clearerr(3), fopen(3) Standards: standards(5) delim off feof(3)

Check Out this Related Man Page

clearerr(3)						     Library Functions Manual						       clearerr(3)

NAME
clearerr - Clears indicators on a stream LIBRARY
Standard C Library (libc) SYNOPSIS
#include <stdio.h> void clearerr( FILE *stream); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: clearerr(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the input or output stream to be cleared. DESCRIPTION
The clearerr() function resets the error indicator and the EOF indicator for the stream specified by the stream parameter. NOTES
[Tru64 UNIX] The clearerr() function is supported for multithreaded applications. RETURN VALUES
The clearerr() function returns no value. RELATED INFORMATION
Functions: open(2), fopen(3), feof(3), fileno(3), ferror(3) Standards: standards(5) delim off clearerr(3)
Man Page

10 More Discussions You Might Find Interesting

1. Programming

Feof

Hi Everyone, I'm having problems with feof I've storing my variables inside a file, and then in another program, opening that file and recalling the information. The problem im having is that it's repeating the last set of entries in my while loop. (if i have one set of product no., quantity,... (1 Reply)
Discussion started by: primal
1 Replies

2. UNIX for Dummies Questions & Answers

Standards

I have been asked to put together some coding standards for the project I am assigned to. I have found documented standards for C/C++, Java but was wondering if there is a good place for UNIX scripting (Korn/Bourne) standards? Does anyone know of a good place to find information on scripting... (3 Replies)
Discussion started by: google
3 Replies

3. UNIX for Dummies Questions & Answers

Positioning curser at EOF in vi

Hi there, Is there a way to position the cursor at EOF in vi, I know from the man pages how to position the cursor at the end of a paragraph, but what about the EOF (End Of File). Regards (6 Replies)
Discussion started by: JimJim
6 Replies

4. UNIX for Dummies Questions & Answers

Eof

hello all, how end of a file is detected in UNIX system? does it make use of any special symbols to identify the EOF? :( thank you all (5 Replies)
Discussion started by: compbug
5 Replies

5. Programming

erroneous output

#include<stdio.h> int main () { FILE* f_read; FILE* f_write; char *string; f_read=fopen("file1","r"); while(!feof(f_read)); { fscanf(f_read,"%s",string); fprintf(stdout,"%s\n",string); ... (2 Replies)
Discussion started by: bishweshwar
2 Replies

6. UNIX for Dummies Questions & Answers

\n after EOF

Hello all, I have unix file that ends with the following EOF '9999999999' I want to remove the '\n' character after EOF. What is the command that should be included in the script, before sending the file? will this work: $ echo "<99999999999>\c" >> <filename> thanks in advance. (3 Replies)
Discussion started by: priya12
3 Replies

7. Programming

Eof

How can I write EOF into a file? I tryed to do as follows: size=sizeof(EOF); end_of_file=EOF; write(fdMutexRichieste, &end_of_file, size); But it does non work correctly, becouse in the next cicle (using lseek(..., SEEK_END) of my code it seems to ignore my EOF and use the LAST... (5 Replies)
Discussion started by: DNAx86
5 Replies

8. UNIX for Dummies Questions & Answers

Urgent..!!

What is the output for this prgm? $vi test<<EOF >:5 >dd >:wq! >EOF $ (2 Replies)
Discussion started by: karthi_g
2 Replies

9. UNIX for Dummies Questions & Answers

multiple if conditions and EOF in a shell script

I want to create an IF condition with multiple condition, in the statement below I want to add OR EOF, can any one please advise how to do. if } != $sample ] && ; then echo ..... fi code tags please (1 Reply)
Discussion started by: analyst
1 Replies

10. Shell Programming and Scripting

To skip operations in UNIX shell

hi i am having a acript for which i need to skip the execution of some lines and to continue with remaining lines for eg script.sh rm text for i in * do . . . . . if then rm i want to skip the execution of the lines and to start with (11 Replies)
Discussion started by: rohit_shinez
11 Replies