[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: input from a file for 'ed'

Ariful Hossain wrote:
> Can anyone explain what happens 
> $ed<temp

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.


Attachment: signature.asc
Description: Digital signature

Reply to: