On Thu, Nov 15, 2001 at 10:43:10AM -0600, Bret Hughes <[EMAIL PROTECTED]> wrote:
| srikrishnan wrote:
| >     Is there any way to check the "EOF" using the shell script.
| > please do help me.
| 
| Are you asking how to test a file to see if it contains an EOF?

Which is a meaningless concept on UNIX.

Most likely he wants to know when he his the end of stdin (or whatever
he's reading).  There's only one input function in the shell itself,
being "read", which fails at EOF. Thus one says things like:

        while read line
        do  echo "The line was: $line"
        done

which will read lines until the read fails at EOF, and exit the loop.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

Everything that can be invented has been invented.
        - Charles H. Duell, Commissioner, U.S. Office of Patents, 1899.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to