腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
*nix,*bsd等基本的“`
tput
`”颜色设置
linux
、
portability
、
posix
、
sh
、
color
/bin/sh #
Linux
-like
tput
_
bold
=$(
tput
bold
2> /dev/null)
浏览 0
提问于2020-10-09
得票数 4
回答已采纳
1
回答
BSD (&
Linux
)
tput
-基本可互操作色彩设置
terminal
、
colors
、
bsd
、
tput
/bin/sh #
Linux
tput
tput
_cmd_set_fg_color='
tput
setaf'
tput
_
bold
=$(
tput
bo
浏览 0
提问于2020-07-30
得票数 0
回答已采纳
1
回答
输入cron作业不会输出粗体文本。
linux
、
cron
、
tput
我以一种非常奇怪的行为回来了echo "$(
tput
bold
)" start write to log "$(
tput
sgr0)" >> /tmp/log.txtmore /tmp/log.txt start write to log <-----
BOLD</
浏览 0
提问于2019-08-06
得票数 0
回答已采纳
1
回答
向bash脚本的特定行添加颜色
shell-script
、
scripting
、
colors
| head -46 \ | sed '3G;6G;9G;12G;15G;18G;21G;24G;27G;30G;33G;36G;39G'我试图在包含标题和时间的线条
中
添加颜色`echo -en "\e[0m"`r=`echo -en "\e[31m"` a=`echo -en "\e[36m"`我尝试过用几种方式将它们添加到脚本
中
,f2 | cut -d '<
浏览 0
提问于2018-02-06
得票数 2
1
回答
术语/术语“`
tput
bold
‘/`
tput
’:粗体文本的可移植性
colors
、
portability
、
tput
、
terminfo
、
termcap
/bin/sh
tput
_init_bsd () { set_fg_color='
tput
AF'; reset_color=$(
tput
me 2>/
浏览 0
提问于2022-02-12
得票数 1
回答已采纳
1
回答
Bash脚本
中
存在解析错误
linux
、
bash
每次设置新的
linux
系统时,我都会尝试创建一个bash脚本。该脚本旨在制作一个列表,其中显示了我可以在我的脚本
中
执行的选项,并且它应该具有颜色和一种检查选项是否已经运行过的方法。
bold
)$(
tput
setaf 1)Not yet run$(
tput
sgr0)' answer="" echo"$(
tput
bold
) Script:
浏览 28
提问于2017-07-13
得票数 0
回答已采纳
1
回答
Bash与环境变量
bash
、
environment-variables
wht="$(
tput
bold
;
tput
setaf 15 )"blu="$(
tput
bold
;
tput
setaf39 )"red="
浏览 0
提问于2023-03-13
得票数 -2
回答已采纳
1
回答
Tput
windows git shell的颜色定义
git
、
shell
、
workflow
我正在尝试自定义我的git shell,我发现了这个非常有趣的,但正如你所看到的,它使用
tput
来设置颜色定义,我不能让它在windows上工作,因为
tput
不是windows原生的,有没有什么替代方案可以做到这一点BLACK=$(
tput
setaf 0)GREEN=$(
tput
setaf 2)LIME_YELLOW=$(
tput
setaf 190) POWDER_BLUE=
浏览 1
提问于2013-10-31
得票数 12
回答已采纳
2
回答
Bash和Zsh提示按铃并显示最后命令的错误代码。
bash
、
return-value
、
command-prompt
、
zsh
、
prompt
在巴斯,我确实有:RED="\[$(
tput
setaf 1;
tput
bold
)\]"GRN="\[$(
tput
setaf 2;
tput
bold
)\]" yel="\[$(
tput</
浏览 5
提问于2020-02-20
得票数 1
回答已采纳
1
回答
除了文件之外,如何删除目录
中
的所有目录(安全)?
directory
、
make
、
rm
、
delete
环境外壳: Bash版本4.4.19(1)。除了数百种测试场景之外,我还创建了无数临时安装目录,其中文件是它们的内容,每次我都需要手动删除。当前被重新分解的“干净”生成文件目标
tput
bold</em
浏览 0
提问于2018-10-14
得票数 0
回答已采纳
2
回答
SC2155的最佳实践:分别声明和分配
bash
我正在编写bash脚本和我的IDE,抱怨以下声明:local red=$(
tput
setaf 196)local
bold
=$(
tput
bold
) local
bol
浏览 0
提问于2022-01-25
得票数 6
回答已采纳
1
回答
printf bash内置可能存在填充错误
string
、
bash
、
formatting
、
printf
、
padding
: %s\n" "$(
tput
bold
;
tput
setaf 48)" "$(
tput
sgr0;
tput
setaf 78;echo ${MOTD_TOTAL_CPUS})" printf " %sTotal Memory: %s\n" "$(
tput
bold
;
tput
setaf 48)"
浏览 14
提问于2016-08-30
得票数 3
回答已采纳
1
回答
如何修复函数‘_start’
中
的错误:(.text+0x20):未定义的对‘`main’的引用
c
、
vagrant
、
virtualbox
、
linker-errors
每次在虚拟机
中
运行make时,都会得到以下错误:/usr/lib/gcc/x86_64-
linux
-gnu/7/../../x86_64-
linux
-gnu/Scrt1.o: In (.text+0x20): undefined reference to `main' collect2
浏览 1
提问于2019-03-28
得票数 1
2
回答
回波输出不同于预期的格式化输出。
bash
、
cygwin
、
echo
我对echo使用了以下格式 它应该输出粗体和带下划线的文本,但它不是粗体,而是给出了颜色的“更亮”变体,并将带下划线的代码(4)当作青色,从而产生了亮青色文本。编辑:我找到了一个与我的案例相关的链接,但我不确定它是如何应用的,因为我使用Cygwin的时,它们正在使用windows 10更新bash
浏览 1
提问于2018-11-29
得票数 1
回答已采纳
1
回答
bash版本3.2.25和4.1.2之间的PS1提示符差异
bash
、
ps1
我有一个首选的bash提示布局,并尝试将其应用于工作
中
的两个不同的系统。但是,它在两个环境
中
的性能并不相同。 如问题中所列,一个运行3.2.25,另一个运行4.1.2。
浏览 7
提问于2017-10-06
得票数 0
1
回答
处理彩色印刷的多种颜色声明
awk
here Some green text here 'BEGIN { "
tput
bold
;
tput
setaf 15" |& getline wht "
tput
bold
;
tput
浏览 0
提问于2023-02-12
得票数 -2
回答已采纳
1
回答
终端底部后的bash滚动会将背景颜色复制到下面的整行。(例如,用背景色提示)
bash
、
ps1
calculate_prompt1() host="my-
linux
" prompt="@$host \\w : \[$(
tput
bold
)$(
tput
setab 1)$(
tput
setaf7)\]${git_branch}\[$(<
浏览 5
提问于2018-03-23
得票数 1
1
回答
如何使用“`
tput
`”指定下一行
shell-script
、
colors
、
tput
如何使用
tput
再现Python
中
为文本添加颜色的下面一行?[Y/n] \x1b[0m') 我尝试了
tput
setaf 4、
tput
bold
、
tput
sgr 0的变体,但无法完全做到这一点。
浏览 0
提问于2021-03-18
得票数 -1
回答已采纳
2
回答
在xterm
中
,我可以在不重置当前颜色的情况下关闭粗体或下划线吗?
bash
、
fonts
、
formatting
、
xterm
、
underline
在现实
中
,匹配被提取出来,自己处理,并进一步分解和分析。这不是通过改变我在这里给出的表达式就能做到的。)
浏览 0
提问于2013-03-23
得票数 6
回答已采纳
2
回答
如何在不知道安装点的情况下判断设备UUID已安装?
mount
、
posix
、
block-device
、
uuid
、
readlink
tput
bold
;
tput
setaf 2; printf '%b' "Un-mounting OK."
tput
bold
;
tput
setaf 2; printf '%b' "Powering-off OK.\\n";
tput
sgr0
tp
浏览 0
提问于2019-03-31
得票数 2
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
如何美化您的Linux终端和Shell提示符
linux高级课程-在Linux中编程
理解Linux中Load
如何在 Linux 中合并 PDF 文件|Linux 中国
在 Linux 中创建定时器|Linux 中国
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
云直播
实时音视频
活动推荐
运营活动
广告
关闭
领券