FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-18-2010, 08:26 AM
Ariful Hossain
 
Default input from a file for 'ed'

Can anyone explain what happens
$ed<temp

it ends up with a ken thompson's infamaous '?'

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?
--
Freeburn
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 listmaster@lists.debian.org
Archive: 1279441596.2432.12.camel@freeburn">http://lists.debian.org/1279441596.2432.12.camel@freeburn
 
Old 07-18-2010, 12:43 PM
Bob Proulx
 
Default 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.

Bob
 

Thread Tools




All times are GMT. The time now is 11:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org