1

Reading a file line by line, using while loop

view story
linux-howto

http://unix.stackexchange.com – I'm trying to use while read loop to read each entire line from a file, but have strange behaviour; my shell is located in a directory also containing *.csv file (I don't if there's a relation between those files and the behaviour.) Loop: while read line do echo $line done < $FILE When I execute my script I have that kind of result: $ligne1 ==> OK file1.csv file2.csv file3.csv $ligne 2 ==> Strange behaviour $ligne3 ==> OK $ligne4 ==> OK file1.csv file2.csv file3.csv $ligne5 ==> Strange behaviour Do you have some of the origin of the problem? (HowTos)