Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
终端回显bash中定义的函数
Experiences and Insight
722
views ·
3
replies ·
To
floor
Go
sparkbjfu
deepin
2015-01-21 17:21
Author
在bashrc中定义了一个函数,但是在启动终端时定义函数的代码会显示的终端上,同样的代码在CAELinux上测试了,不会回显
另外发现,在bash中写if [ "a" == "a" ] 会报错,改成if [ "a" = "a" ]才行
求问,这是什么情况呢
Reply
Like 0
Favorite
View the author
All Replies
sparkbjfu
deepin
2015-01-21 17:23
#1
bash中定义的函数代码是
myfun() { echo "test fun" ; }
Reply
Like 0
View the author
electricface
deepin
2015-01-21 17:38
#2
我也写了,没有回显啊
Reply
Like 0
View the author
sparkbjfu
deepin
2015-01-21 19:03
#3
我也写了,没有回显啊
你再下面加一句
export -f myfun
试下呢?
另外,如果不加这句,和加了,有什么使用上的不同??
Reply
Like 0
View the author
Please
sign
in first
New Thread
Popular Ranking
Change
UOS Language Problem
Mouse feels like I'm on a skating rink (slippery movement)
dualboot
Just a minor translate mistake
Deepin installation failed
how can i download photoshop cc in linux
Popular Events
More
另外发现,在bash中写if [ "a" == "a" ] 会报错,改成if [ "a" = "a" ]才行
求问,这是什么情况呢