Re: Sed programming question

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

 



Cameron Simpson wrote:
On 10Dec2008 18:39, Dan Thurman <dant@xxxxxxxxx> wrote:
[snip!]
You can only do AND by nesting multiple pattern matches:

  /foo/{
    /bar/{
      ... do stuff for "foo" AND "bar"
    }
  }
I tested your suggestion above with and without -r option
but could not make it work as an "AND operator":

# echo "foo har" | sed -re '/foo/{/bar/{s/foo/goo/}}'
goo har


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux