最佳答案
I have the following code:
for x in "${array[@]}"
do
echo "$x"
done
The results are something like this (I sort these later in some cases):
1
2
3
4
5
Is there a way to print it as 1 2 3 4 5
instead? Without adding a newline every time?