[Top][All Lists]

[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
<address@hidden> 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
<address@hidden> 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

        <#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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]