0

How can I merge the input arguments to be as single element in array?
for example, the name of the script is "run_it" so, if I will run the script in the next way:
run_it a b c d

I want to create array with just only cell: arr[0]="a b c d".

I thought to do it like that:
arr=("$@")

But I get that : arr[0]=a arr[1]=b arr[2]=c arr[3]=d.
Can someone explain why it's the result and how can I fix it?

0 Answers0