【发布时间】:2014-06-04 23:59:20
【问题描述】:
我是 Linux 的初学者。我在为文本中的单词着色时遇到问题。
red="\033[31m"
green="\033[31m"
blue="\033[34m"
endColor="\033[0m"
line=$(echo -e $input | sed -e "s/${word}/\ ${red} \ ${word} \n \${endColor}/g")
echo $line
in the standard output is this instead of red colored "word"
>> sdngasf 033[31m word n ${endColor}sdaadmfuw
谁能帮我解决这个问题,谢谢
【问题讨论】: