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

SQL php on different pages to Insert (mysqli) -

php - How can an email be returned from Stripe Checkout? -

sql - Partition elimination in Greenplum -