Re: Problem with positional output
"Amarendra Godbole [email protected] [sed-users]" <[email protected]> Wed, 16 Nov 2016 23:17:11 +0000
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <D45228B6.2F40B%[email protected]> |
Linux man pages are known to lag behind and/or incorrect. Doesn¹t surprise me, since most focus these days seems to add more and more code, who cares for the manpages anyways? ;-) -ag On 11/16/16, 3:14 PM, "[email protected] on behalf of [email protected] [sed-users]" <[email protected]> wrote: > > > 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. > > > > >---In [email protected], <cs@...> wrote : > > On 14Nov2016 14:09, Michelle Konzack <linux4michelle@... >mailto:linux4michelle@...> wrote: > >> The string has 4 parameters, deperated by the | sign and I like to get > >> it with something like > >> > >> echo "${RETVAL}" |sed 's!(.*)|(.*)|(.*)!$1!' > > > >This is now working with: > > > > echo "${RETVAL}" |sed 's!\(.*\)|\(.*\)|\(.*\)!\1!' > > By default sed uses Basic Regular Expressions, where \( and \) and >needed for > grouping. Some seds (eg GNU sed) accept a -E option to enable Extended >Regular > Expressions, where ( and ) are the syntax (and various other extra >things > work). > > Cheers, > Cameron Simpson <cs@... mailto:cs@...> > > > >[Non-text portions of this message have been removed] > > > >------------------------------------ >Posted by: [email protected] >------------------------------------ > >-- > >------------------------------------ > >Yahoo Groups Links > > >