FERROR(3S)FERROR(3S)NAME
ferror, feof, clearerr, fileno - stream status inquiries
SYNOPSIS
#include <stdio.h>
feof(stream)
FILE *stream;
ferror(stream)
FILE *stream
clearerr(stream)
FILE *stream
fileno(stream)
FILE *stream;
DESCRIPTION
Feof returns non-zero when end of file is read on the named input stream, otherwise zero. Unless cleared by clearerr, the end-of-file
indication lasts until the stream is closed.
Ferror returns non-zero when an error has occurred reading or writing the named stream, otherwise zero. Unless cleared by clearerr, the
error indication lasts until the stream is closed.
Clearerr resets the error and end-of-file indicators on the named stream.
Fileno returns the integer file descriptor associated with the stream, see open(2).
Currently all of these functions are implemented as macros; they cannot be redeclared.
SEE ALSO fopen(3S), open(2)4th Berkeley Distribution May 14, 1986 FERROR(3S)
Check Out this Related Man Page
FERROR(3) Linux Programmer's Manual FERROR(3)NAME
clearerr, feof, ferror, fileno - check and reset stream status
SYNOPSIS
#include <stdio.h>
void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);
int fileno(FILE *stream);
DESCRIPTION
The function clearerr clears the end-of-file and error indicators for the stream pointed to by stream.
The function feof tests the end-of-file indicator for the stream pointed to by stream, returning non-zero if it is set. The end-of-file
indicator can only be cleared by the function clearerr.
The function ferror tests the error indicator for the stream pointed to by stream, returning non-zero if it is set. The error indicator
can only be reset by the clearerr function.
The function fileno examines the argument stream and returns its integer descriptor.
For non-locking counterparts, see unlocked_stdio(3).
ERRORS
These functions should not fail and do not set the external variable errno. (However, in case fileno detects that its argument is not a
valid stream, it must return -1 and set errno to EBADF.)
CONFORMING TO
The functions clearerr, feof, and ferror conform to X3.159-1989 (``ANSI C'').
SEE ALSO open(2), unlocked_stdio(3), stdio(3)
2001-10-16 FERROR(3)
Hello,
I have a big data file (160 MB) full of records with pipe(|) delimited those fields. I`m sorting the file on the first field.
I'm trying to sort with "sort" command and it brings me 6 minutes.
I have tried with some transformation methods in perl but it results "Out of memory". I was... (2 Replies)
Good afternoon to you all
I need help
I need a script that will allow to encrypt the system´s timestamp;
I have to use a pre-shared key to cipher the timestamp, so basically I need:
1st) cipher with a pre-shared key
2nd) encrypt the timestamp
3rd) encode on a base64
the output... (1 Reply)
Hi
I need to get the date of 50th day from the last friday for one of the calculation into variable in Unix script. The format required is YYYYMMDD. I have solaris OS and dont have GNU date. I would appreciate if some one can help me with this.
It can be a onliner or function or block of code.
... (7 Replies)
Hello,
I am trying to read a text file into linked list, but always got the first and last records wrong.
1) The problem looks related to the initialization of the node temp with malloc(), but could not figure it out. No error/warning at compiling, though.
2) The output file is empty,... (10 Replies)
This seems like it should be an easy problem, but for some reason I am struggling with the solution.
I simply want to replace all characters after the first 3 characters with another character, preferably with sed.
Thanks in advance.
Like this, but producing the proper number of *'s:
sed... (30 Replies)
Another project, another bump in the road and another chance to learn. I've been trying to open gzipped files and parse data from them and hit a snag. I have data in gzips with a place followed by an ip or ip range sort of like this:
Some place:x.x.x.x-x.x.x.x
I was able to modify some code... (6 Replies)
Hello all,
I'm here again with new trouble. I need to find any possible way to apply excel macro on excel file in SLES server, or to convert that macro somehow.
Could you please share your ideas, and help me with this? Thank you in advance
ps (attached macro is with changed extension,... (14 Replies)
what i should to do next? read full query first please!!
harshbhu@harshbhu:/usr/local/gg/10.6/updates/Source$ sudo ./install_software
sudo: unable to resolve host harshbhu
install_software version 2017/06/29
GAMIT and GLOBK to be installed into /usr/local/gg/10.6/updates/Source
If... (0 Replies)
harshbhu@harshbhu:/usr/local/gg/10.6/updates/Source$ sudo ./install_softwaresudo: unable to resolve host harshbhu
password for harshbhu:
install_software version 2017/06/29
GAMIT and GLOBK to be installed into /usr/local/gg/10.6/updates/Source
If you need help with command line... (1 Reply)
Hello Team,
I have to verify the Client server certificate validation in HTTPS request(SSL hand shake before the actual HTTPS post request), And tried various ways and failed to verify it successfully.
here are the trials and errors,
resp = requests.post(url, req, verify=True, timeout=5,... (0 Replies)
Experts,
Need your help for this. Please support
My motive is to create seperate output file for each Input Files(File 1 and File2) in another folder say(/tmp/finaloutput)
Input files
File 1(1.1.1.1.csv)
a,b,c
43,17104773,3
45,17104234,4
File 2(2.2.2.2.csv)
a,b,c
43,17104773,1... (2 Replies)