Read a file line by line assigning the value to a variable

后端 未结 10 1188
说谎
说谎 2020-11-21 07:37

I have the following .txt file:

Marco
Paolo
Antonio

I want to read it line-by-line, and for each

10条回答
  •  误落风尘
    2020-11-21 08:22

    The following will just print out the content of the file:

    cat $Path/FileName.txt
    
    while read line;
    do
    echo $line     
    done
    

提交回复
热议问题