[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mapfile -C issue
From: |
alex xmb ratchev |
Subject: |
Re: mapfile -C issue |
Date: |
Sun, 18 Jun 2023 02:56:25 +0200 |
On Sun, Jun 18, 2023, 02:52 alex xmb ratchev <fxmbsw7@gmail.com> wrote:
> there is missing arguments in called C ()
>
> ~ $ C() { declare i= ; while (( ++i <= $# )) ; do echo $i ${!i} ; done ; }
> ; mapfile -d '' -C C -c 3 < <( printf %s\\0 11 22 33 44 55 66 )
> 1 2
> 2 33
> 1 5
> 2 66
> ~ $
>
> is such a bug
>
> i expected
> 1 11
> 2 22
> 3 33
> 1 44
> 2 55
> 3 66
>
sorry , wrong logic
1 1
2 11
3 2
4 22
5 3
6 33
1 4
2 44
3 5
4 55
5 6
6 66
or the same with 0 as beginning instead of 1
>
> .. i thought i can bind data to -c count blocks
>
> .. so , logically my script ings fail , somewhere ..
>
> .. greets ..
>
- mapfile -C issue, alex xmb ratchev, 2023/06/17
- Re: mapfile -C issue,
alex xmb ratchev <=
- Re: mapfile -C issue, Emanuele Torre, 2023/06/17
- Re: mapfile -C issue, alex xmb ratchev, 2023/06/18
- Re: mapfile -C issue, Chet Ramey, 2023/06/19
- Re: mapfile -C issue, alex xmb ratchev, 2023/06/19
- Re: mapfile -C issue, Emanuele Torre, 2023/06/19
- Re: mapfile -C issue, alex xmb ratchev, 2023/06/19
Re: mapfile -C issue, Greg Wooledge, 2023/06/17