addition using array values into a variable not possible?
Hi there.
I am trying to add every value in an array together in a single variable. The script is working, but throws an error: Is it not possible to add values from an array into a non-array variable? Code:
echo Input some numbers, separated by a space please: |
Hi.
This should work: Code:
echo Input some numbers, separated by a space please: |
There is some more overhead that is not really required:
Code:
#!/bin/bash |
Thank you very much!
Really impressively quick answers. |
Or how about this?
Code:
$ choice=( 1 2 3 4 5 ) |
All times are GMT -5. The time now is 06:14 AM. |