Re: Print ranges without its BEGIN and END patterns
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
> perl -ne '$s=/^sec/../^fou/; print if $s>1 and $s!~/E/'
We can also use -ve lookbehind to skip the begin/end patterns, like as,
perl -lne 'print if (/^sec/../^fou/) =~ /^\d+(?<!^1)$/' yourfile
--Rakehs
[Non-text portions of this message have been removed]