|
| From: | João Eiras |
| Subject: | Re: [Help-bash] Storing cursor positions using tput into an array. |
| Date: | Mon, 11 Sep 2017 15:20:14 +0200 |
> eval "$1[0]=$((${pos[0]:2} - 2))"
> eval "$1[1]=$((${pos[1]} - 1))"}
>
> save_pos pos works, But i want something like save_pos pos[$index];
You're trying to create an array of arrays which is not supported in
bash. I'd change your function to store both coordinates as "x,y".
| [Prev in Thread] | Current Thread | [Next in Thread] |