From: Sonny Chee Date: 2007-04-16T11:56:48+09:00 Subject: Re: End-of-file character... Thanks for the clarification Austin. I'm actually to trying to solve the following problem. I've been redirecting the contents of a_file to an os_command, ie: os_command < a_file Usually a_file is very small and I have to create this file before invoking the os_command. Is it possible to avoid the creation of a_file and just pass its contents directly to os_command? Sonny. > There is, in fact, no "end-of-file" character on > Unix, and Ctrl-Z (0x26) is the end-of-file character on Windows only > when the file is not opened in binary mode. It is conventional for a > terminal to accept Ctrl-D (0x04) as an end of file character, but this > is convention, not standard. > > If you want to close a file, just close it. The underlying routines > will do the appropriate work necessary. > > -austin -- Posted via http://www.ruby-forum.com/.