slitaz-base-files rev 265

libtaz.sh: emsg: sed: no need to backslash end of line in the single quotes: fix bug with GNU sed (thanks Ceel for bugreport).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Mar 28 16:54:21 2015 +0200 (2015-03-28)
parents afdcd56c5418
children 27287c7c55c9
files rootfs/lib/libtaz.sh
line diff
     1.1 --- a/rootfs/lib/libtaz.sh	Thu Dec 04 16:50:46 2014 +0200
     1.2 +++ b/rootfs/lib/libtaz.sh	Sat Mar 28 16:54:21 2015 +0200
     1.3 @@ -140,8 +140,8 @@
     1.4  			for c in $(seq 1 $cols); do
     1.5  				sep="${sep}="
     1.6  			done
     1.7 -			echo -en "$(echo "$@" | sed -e 's|<b>|\\033[1m|g; s|</b>|\\033[0m|g; \
     1.8 -			s|<c \([0-9]*\)>|\\033[1;\1m|g; s|</c>|\\033[0;39m|g; s|<n>|\n|g; \
     1.9 +			echo -en "$(echo "$@" | sed -e 's|<b>|\\033[1m|g; s|</b>|\\033[0m|g;
    1.10 +			s|<c \([0-9]*\)>|\\033[1;\1m|g; s|</c>|\\033[0;39m|g; s|<n>|\n|g;
    1.11  			s|<->|'$sep'|g; s|<i \([0-9]*\)>|\\033[\1G|g')"
    1.12  			[ "$1" != "-n" ] && echo
    1.13  			;;