Compute the Average

  • + 1 comment
    #!/bin/bash
    read n
    array=($(cat))
    
    I tried above lines and it went in infinite loop of taking input from user and it never stopped . Am i doing anything wrong here?