How to display an array's content in colomns, like ls -C does.
- by Arko
I wanted to display a long list of strings from an array.
Right now, my script run through a for loop echoing each value to the standard output:
for value in ${values[@]}
do
echo $value
done
Yeah, that's pretty ugly! And the one column listing is pretty long too...
I was wondering if i can find a command or builtin helping me to display all those values in columns, like the ls command does by default when listing a directory (ls -C).