Retrieving backreferences



Hi!

Well, I can use cut or awk for retrieving some especifics wanted
pieces of texts. But I didnt find how to retrieve a pattern match to
use in the next shell command. In Perl would be

$matched = $1 if ($string =~ /a(.)c/);

I saw egrep and sed support backreference, but I don't know if such
references stay available out of the expression.
Some hint?




Tom

.



Relevant Pages

  • Re: Retrieving backreferences
    ... I can use cut or awk for retrieving some especifics wanted ... pieces of texts. ... But I didnt find how to retrieve a pattern match to ...
    (comp.unix.shell)
  • Retrieving backreferences
    ... I can use cut or awk for retrieving some especifics wanted ... pieces of texts. ... But I didnt find how to retrieve a pattern match to ...
    (comp.unix.shell)