[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:39:08 -0500 |
On Thu, Apr 16, 2015 at 9:32 AM, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> On Thu, Apr 16, 2015 at 09:29:56AM -0500, Dan Douglas wrote:
>> 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.
>
> IFS=. read -ra octets <<< "$ip"
Sure, but validation is then separate if needed. There are plenty of
applications where you want either a multi-character or non-static
delimiter, possibly with pattern matching on the data at the same
time.
Re: Request to a new feature on read, Valentin Bajrami, 2015/04/16