Any reason to justify this instead of using a simple loop?
--
Eduardo Bustamante
https://dualbus.me/
While I was developing a small script, I thought about how to use -N flag
to a greater extent. Although -N in its own is very limited. It does serve
the purpose but not what I need. I also discussed this in #bash freenode,
and got some ideas like:
pgas: while read -n1 d;do case $d in
On Thu, Apr 16, 2015 at 09:39:08AM -0500, Dan Douglas wrote:
On Thu, Apr 16, 2015 at 9:32 AM, Greg Wooledge wool...@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
On Thu, Apr 16, 2015 at 9:50 AM, Greg Wooledge wool...@eeg.ccf.org wrote:
I don't see why such features should be compiled into bash's read builtin.
I'd have no problem with adding better splitting/joining/parsing features
in a more general context, probably operating on a string variable, but
On Thu, Apr 16, 2015 at 9:32 AM, Greg Wooledge wool...@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=.
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
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
read -N$re -p Enter two or three digits to continue getInput
The above is much of a pseudo-code but I hope you
On Thu, Apr 16, 2015 at 8:55 AM, Eduardo A. Bustamante López
dual...@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.