Home
Sign Up
Sign In
V2EX
›
问与答
求 linux shell 脚用于格式化输出提示信息的脚本?
janwen
·
Oct 13, 2014
· 3368 views
This topic created in 4423 days ago, the information mentioned may be changed or developed.
希望这个脚本输出类似
**************
我是提示信息
**************
记得以前看过这样的脚本,找了半天没找到,突然不知道用什么keyword search了
脚本
输出
Keyword
6 replies
•
2014-10-14 20:36:24 +08:00
lsmgeb89
Oct 13, 2014
1
不就打三行 echo 吗?
izoabr
Oct 13, 2014
2
shell只能echo3行,实在不行你就用curses tpus什么的
python你可以
print '*' * 20
izoabr
Oct 13, 2014
3
参考:
http://www.ibm.com/developerworks/cn/aix/library/au-learningtput/
dorentus
Oct 13, 2014
1
4
搜索关键字用 shell ascii art 或者 shell ascii banner 试试。
janwen
OP
Oct 14, 2014
5
@
dorentus
这个好像都是启动脚本,想找一个类似代替echo封装的函数,脚本统一调用,输出日志
dorentus
Oct 14, 2014
6
@
janwen
bash 的话,类似下面这样的?
function mylog {
echo "---------------------"
echo $@
echo "---------------------"
}
调用:
mylog "Hello, world"
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1881 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms ·
UTC 09:24
·
PVG 17:24
·
LAX 01:24
·
JFK 04:24
♥ Do have faith in what you're doing.
❯