Count the number of elements in an Array

  • + 0 comments
    #!/bin/bash
    
    readarray bal
    
    printf "%s\n" ${bal[@]} | wc -l
    

    my elegant solution