[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request to a new feature on read
From: |
Dan Douglas |
Subject: |
Re: Request to a new feature on read |
Date: |
Thu, 16 Apr 2015 09:29:56 -0500 |
On Thu, Apr 16, 2015 at 8:55 AM, Eduardo A. Bustamante López
<dualbus@gmail.com> wrote:
> Any reason to justify this instead of using a simple loop?
I find myself in need of something along the lines of Python's
`re.split` and `re.findall` all the time. E.g. splitting an ip into an
array of octets.
On Thu, Apr 16, 2015 at 5:49 AM, Valentin Bajrami
<valentin.bajrami@gmail.com> wrote:
> Hi,
>
> According to ''help read'' we can specify -N[chars] to trigger return
> automatically. Is it possible to approach read differently?
>
> For example: $re is some regular expression
FWIW, ksh has two redirect operators that can be used together with
`read` to get something like this. They're somewhat difficult to use
IMO:
<#pattern Seeks forward to the beginning of the next line
containing pattern.
<##pattern The same as <# except that the portion of the
file that is skipped is copied to standard output.
--
Dan Douglas
Re: Request to a new feature on read, Valentin Bajrami, 2015/04/16