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
ferror(3C) Standard C Library Functions ferror(3C)NAME
ferror, feof, clearerr, fileno - stream status inquiries
SYNOPSIS
#include <stdio.h>
int ferror(FILE *stream);
int feof(FILE *stream);
void clearerr(FILE *stream);
int fileno(FILE *stream);
DESCRIPTION
The ferror() function returns a non-zero value when an error has previously occurred reading from or writing to the named stream (see
Intro(3)). It returns 0 otherwise.
The feof() function returns a non-zero value when EOF has previously been detected reading the named input stream. It returns 0 otherwise.
The clearerr() function resets the error indicator and EOF indicator to 0 on the named stream.
The fileno() function returns the integer file descriptor associated with the named stream; see open(2).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO open(2), Intro(3), fopen(3C), stdio(3C), attributes(5), standards(5)SunOS 5.11 17 Feb 2005 ferror(3C)
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)
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)
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)
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)
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)
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)
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)