bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sed blindly eats everything beyond w command filename


From: Dan Jacobson
Subject: Re: sed blindly eats everything beyond w command filename
Date: 09 Mar 2001 08:24:15 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "TT" == Tapani Tarvainen <address@hidden> writes:

TT> address@hidden (Dan Jacobson) writes:
>> sed blindly eats everything beyond w command filename.
>> All the parsing rules go down the drain until newline do we part.

TT> That is the way sed has worked since day one, and the way it
TT> should work according to POSIX.2 as I understand it.
TT> Semicolon is a legal character in filenames, as are {, } and space.
TT> All commands that take filename argument (w, r, s/.../.../w)
TT> should be terminated with a newline.

>> If this is not _bad_ then please at least document it with the w command.
>> GNU sed version 3.02

TT> I don't see anything in the man page that'd indicate semicolon should
TT> terminate filename in 'w' or anywhere else.

TT> It would be a good idea to document the behaviour of semicolon
TT> properly, though.

doc currently:

`w FILENAME'
     Write the pattern space to FILENAME.  The FILENAME will be created
     (or truncated) before the first input line is read; all `w'
     commands (including instances of `w' flag on successful `s'
     commands) which refer to the same FILENAME are output through the
     same FILE stream.

Please add:
     FILENAME is terminated ONLY by a newline. ALL other characters
     are assumed part of FILENAME.

Also add this to r, s/.../.../w documentation, and anywhere else in
man/info pages, if not there already.
-- 
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]