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

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -