certainly first temp is created if not existed previously. and it may
also suppy an EOF(if read systemcall is called first). But i'm lost why
it behaves in this way?
life in a NIX shell
Registered linux user #517617
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org
07-18-2010, 01:43 PM
input from a file for 'ed'
Ariful Hossain wrote:
> Can anyone explain what happens
Two possibilities. You are at a command prompt "$" and are invoking
the 'ed' text editor and redirecting input from a file "temp". Or you
are running a command "$ed" where $ed is an environment variable of
unknown content and redirecting the input from a file "temp". Without
any spaces or other information it isn't possible to tell the difference.
> it ends up with a ken thompson's infamaous '?'
What are the contents of the file "temp"? That is providing command
input to your 'ed' command. Since you haven't shown us what your ed
script is telling 'ed' to do it isn't possible to know.
> certainly first temp is created if not existed previously.
Huh? You say certainly as if we should know what the commands in
"temp" do. Please show us the temp file that we may know what
commands are being executed.
> and it may also suppy an EOF(if read systemcall is called first).
> But i'm lost why it behaves in this way?
You have not yet shown us enough information to help you.