Categories
Linux Mastering Development

Why does my filter function in Bash not work?

I wrote a filter / select function that takes a function and a stream as input. It should yield a new array of ( 2 4 ). However, my result is nothing. I suspect it has something to do with the IFS. # func int -> bool is_even () { (( $1 % 2 == […]

Categories
Linux Mastering Development

Why does my filter function in Bash not work?

I wrote a filter / select function that takes a function and a stream as input. It should yield a new array of ( 2 4 ). However, my result is nothing. I suspect it has something to do with the IFS. # func int -> bool is_even () { (( $1 % 2 == […]

Categories
Linux Mastering Development

Why does my functional filter in Bash not work?

I wrote a filter / select function that takes a function and a stream as input. It should yield a new array of ( 2 4 ). However, my result is nothing. I suspect it has something to do with the IFS. # func int -> bool is_even () { (( $1 % 2 == […]