Question from the Bash - Fundamentals test

Write a Bash script that displays the ordered indices of all folders and files at the root.

Hard

What does the following script do?

#bin/bash

dir=(/*)
 
for i in ${!dir[*]}; do
echo "$i: ${dir[$i]}"
done
Author: titouan lecampStatus: PublishedQuestion passed 173 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!