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 - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -