in reply to do $n exist in grep?
Not that I'm aware of. But you can always DIY:
$ perl -E 'grep { /^..(A|B)./ and push @f, $1 } @ARGV; say @f' xxBxx y +yAyy BA $
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: do $n exist in grep?
by LanX (Saint) on May 12, 2021 at 16:28 UTC | |
by LanX (Saint) on May 12, 2021 at 18:38 UTC | |
|
Re^2: do $n exist in grep?
by misterperl (Friar) on May 12, 2021 at 14:47 UTC |