小编BuZ*_*ain的帖子

为什么 Byobu 自定义状态通知代码无法以彩色显示?

下面的代码在 Bash 中运行良好,并显示具有适当绿色背景颜色的文本,但是当我将其添加到~/.byobu/bin/文件夹时,它会显示转义字符。类似于[42m[1mAPL:30.345 (B[m

#!/bin/sh
echo `tput setab 2;tput bold`AAPL:`curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=AAPL&f=sl1d1t1c1ohgv&e=.csv' | cut -d, -f2;tput sgr0`
Run Code Online (Sandbox Code Playgroud)

server bash scripts byobu

4
推荐指数
2
解决办法
1122
查看次数

标签 统计

bash ×1

byobu ×1

scripts ×1

server ×1