bash - Failed to echo on the same line after using sed -


i reading text file following code , want echo output on same line on screen. preceding that, want trimming sed @ end failed echo output on same line.

while read line; {      var="$(echo $line | sed 's/<[^>]*>//g')";      echo -n "$var" } done < file.txt 

so if echo -n "$line" prints output on same line when `sed' comes in failed so. doing wrong ?


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - Gamma correction doesn't look properly corrected, is this linear? -