Artificial intelligent assistant

bash array fail to store multiple file names I have the following two files: > ls *.ccs.bam m54105_171201_020331.ccs.bam m54105_171201_121745.ccs.bam Unfortunately, I fail to safe them in array: > shopt -s nullglob > ccs_bams=(*.ccs.bam) > echo $ccs_bams m54105_171201_020331.ccs.bam Why does only one file gets printed? Thank you in advance,

It's _storing_ all the names, but you are only accessing the 0th one. From `man bash`:


Referencing an array variable without a subscript is equivalent to ref‐
erencing the array with a subscript of 0.


To reference _all_ elements of the array, as separate words, use `"${ccs_bams[@]}"` ex.


printf '%s\
' "${ccs_bams[@]}"

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7eabafdb7dfc1d126a7934c17f3ba64b