Errors on shell infile -


i got text file test.txt

a b c d e 

and shell script

filename="test.txt"  while ifs= read -r line;     echo "$line"     if [ "$line" = "a" ]                   echo "abc"     fi  done < "$filename" 

i expect see line "abc" after "a" got is:

a b c d e 

any suggestions on what's wrong?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -