How do I append (1 2) to (1 1) to make it ((1 1) (1 2))?
-
5bash doesn't have multi-dimensional arraysnjzk2– njzk22021-08-26 20:57:09 +00:00Commented Aug 26, 2021 at 20:57
-
Please provide enough code so others can better understand or reproduce the problem.Community– Community Bot2021-08-26 21:15:16 +00:00Commented Aug 26, 2021 at 21:15
-
1This smells like an XY problem. Step back and tell us the actual problem you're having.glenn jackman– glenn jackman2021-08-26 21:33:58 +00:00Commented Aug 26, 2021 at 21:33
Add a comment
|
1 Answer
As explained by @njzk2 this is just not possible - Bash does not have a data structure capable of storing arrays of arrays. If you need them you will be much better off using a different language. Depending on what you're trying to do Python, Ruby, Java, R, SQL, or others might be appropriate.