bash - reference array of folders without variable -
if can actual folder array to:
myarray=./*
and can count elements of array this:
${#myarray[@]}
how can without assign variable? this:
${#./*[@]}
bash
not have anonymous arrays. have create , populate array variable, then apply parameter expansion operator it. said, there alternatives using array; @sorontar provides 1 feasible.
Comments
Post a Comment