The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.unix.shell
From: Lem Novantotto <Le...@Hotmail.com>
Date: 17 Sep 2012 14:29:15 GMT
Local: Mon, Sep 17 2012 10:29 am
Subject: Re: sed multiple -e pattern match problem
pk ha scritto:
> "If no next line of input is available, the N command verb shall branch
This would have been relevant if we had run sed with "-n" option.
> to the end of the script and quit without starting a new cycle or > copying the pattern space to standard output." But we didn't. See:
$ sed -n 'N;s/^def\nghi$/foo/;P;D' file # no good
$ sed -n '$!N;s/^def\nghi$/foo/;P;D' file # good
$ sed 'N;s/^def\nghi$/foo/;P;D' file # good
$ sed '$!N;s/^def\nghi$/foo/;P;D' file # good You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||