0

How do I append (1 2) to (1 1) to make it ((1 1) (1 2))?

3
  • 5
    bash doesn't have multi-dimensional arrays Commented Aug 26, 2021 at 20:57
  • Please provide enough code so others can better understand or reproduce the problem. Commented Aug 26, 2021 at 21:15
  • 1
    This smells like an XY problem. Step back and tell us the actual problem you're having. Commented Aug 26, 2021 at 21:33

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.