cc:  [email protected]  [EMAIL PROTECTED]
Subject: Re: Re: Re: [ast-users] In-place file modification
--------

> It would be nice to replace that with
> 
>         sed -e 's/oldtext/newtxt' < file >; file
> 
> I'd be happy with a mechanism that supported this "typical" case.  For
> the other special cases (device files, multiple file descriptors, etc.)
> perhaps you could just say "not allowed here" and force the programmer
> to use more traditional mechanisms to clarify the intent.
> 
> 
> -- 
> Peter Fales
> Alcatel-Lucent
> 

Of course it would be useful in this case, but all the other cases
must be decided as well.  Are they errors?   Do scripts abort with
these errors? 

Perhaps >; for device files should be treated as > rather than
be an error.

Your case may be all that users want, but the implementation
must deal with all possible cases and either do sensible things
are report errors and posssible exit appropriately.

Another question, what if a non-zero exit to a command is
not actually a failure but just some other indication, for example,
        grep foobar < file >; file
If there are no matches to foobar, should file contain the
original file or an empty file?

My point is that in order to add this feature, all these questions
need to be answered so this is not a trivial request.  The user
benefits need to outweigh any problems and confusions that it
could bring.

David Korn
[EMAIL PROTECTED]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to