• + 0 comments
    while ISF=' ' read -r -a line; do
    
        if  [ ${#line[@]} -ne 1 ]
        then
            echo ${line[3]}
        else
            echo ${line[0]}
        fi
    done
    
    -r Option
    -r: When the -r option is used, read treats backslashes literally. This means that the backslashes will not be used as escape characters. Without -r, read would interpret backslashes as escape characters, which could be used to escape special characters (like newline).
    -a Option
    -a: The -a option allows you to read the input into an array. This means that each word of the input will be stored as an element in the array. You need to specify the name of the array immediately after the -a option.
    
    
    e