| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
Now imagine that you were facing some trouble running some "sed" code; where would you turn to in such a scenario if not the manpages on your terminal? Or, that your OpenBSD 6.0 system for "sed" manpages is not updated and shows you features & options not in the version of sed you are actually running... won't that be a needless hindrance to the users?
The documentation better track the code for not being a roadblock to the users. In fact an uptodate doc is an asset to the productivity.
---In [email protected], <amarendra_godbole@...> wrote :
I am not sure which BSD are you referring, but my OpenBSD 6.0 system does
document -E:
SED(1) General Commands Manual
SED(1)
NAME
sed - stream editor
SYNOPSIS
sed [-aEnru] [-i[extension]] command [file ...]
sed [-aEnru] [-e command] [-f command_file] [-i[extension]] [file ...]
DESCRIPTION
The sed utility reads the specified files, or the standard input if no
files are specified, modifying the input as specified by a list of
commands. The input is then written to the standard output.
A single command may be specified as the first argument to sed.
Multiple
commands may be specified separated by newlines or semicolons, or by
using the -e or -f options. All commands are applied to the input in
the
order they are specified regardless of their origin.
The options are as follows:
-a The files listed as parameters for the w function or flag are
created (or truncated) before any processing begins, by
default.
The -a option causes sed to delay opening each file until a
command containing the related w function or flag is applied
to a
line of input.
-E Interpret regular expressions using POSIX extended regular
expression syntax. The default behaviour is to use POSIX
basic
regular expression syntax.
Š
Thanks.
-ag
On 11/16/16, 3:41 PM, "[email protected] mailto:[email protected] on behalf of Stephane
Chazelas stephane.chazelas@... mailto:stephane.chazelas@... [sed-users]"
<[email protected] mailto:[email protected]> wrote:
>2016-11-16 15:14:09 -0800, sharma__r@... mailto:sharma__r@... [sed-users]:
>>
>>
>> Surprisingly , gnu sed --help doesn't showup the "-E" option
>> while it does take it sed -E "..." without any errors.
>>
>> BTW, the "-r" option is supposed to be doing this.
>>
>>
>> This definitely calls for an update of the GNU sed help options.
>[...]
>
>GNU sed came first with -r. Then, BSD added -E for the same
>thing (which makes a lot more sense and is consistent with grep
>for instance).
>
>Then GNU grep added -E as a synonymous of -r for compatibility
>with BSD but decided to leave it undocumented..
>
>Then POSIX talked of specifying sed -E (likely to be in the next
>major version).
>
>Then GNU grep eventually documented -E (though there hasn't been
>a new released since yet I beleive).
>
>--
>Stephane
>
>
>------------------------------------
>Posted by: Stephane Chazelas <stephane.chazelas@... mailto:stephane.chazelas@...>
>------------------------------------
>
>--
>
>------------------------------------
>
>Yahoo Groups Links
>
>
>
[Non-text portions of this message have been removed]