-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Seenivasan said:
I heard people saying when executing a program 3 standard files will be
opened namely STDIN, STDOUT, STDERR. Is it so? if so what is the
purpose and what each of them stands for?
Explanation of the concept, Guidence to / provision of resources will
be of great help.
"There is a large family of UNIX programs that read some input, perform a
simple transformation on it, and write some output. Examples include grep and
tail to select part of the input, sort to sort it, wc to count it, and so on."
("The Unix Programming Environment" Brian W. Kernighan & Rob Pike)
The designers of Unix decided that there is some utility in providing every
program with predefined access to three data streams. They include access to
an input data stream (called "stdin") that the program can read and process,
an output data stream (called "stdout") that the program can write it's normal
output to, and a second output data stream (called "stderr") that the program
can write error messages or other diagnostics to.
They also provided mechanisms to permit programs to be hooked together in
"pipelines", with the output (that is, stdout) from one program being piped
directly into the input (that is, stdin) of the next program.
- --
Lew Pitcher
Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (
http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
iD8DBQFD5t5OagVFX4UWr64RAo7gAKDKaYXL8voVTEdV6HwhWfIaCg3qQwCeK69W
fbXewYWN9NM1ZkMFtgBVUmE=
=mT6d
-----END PGP SIGNATURE-----