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
Post a Comment