I have taken input from user into array. But I need to use them as comma separated list. How can I do that? Input in my case is path like (/usr/tmp/). I appreciate your help and time. Thank you !
Example:
read "Number of subdirectories : " count
for i in $(seq 1 $count)
do
read -e -p " Subdir : $i: " arr[$i]
done
Expected Result:
$var = {arr[1],arr[2],arr[3],......}