请问下面这个shell脚本有什么问题?为什么函数执行不了?
1 #!/bin/sh 2 #function 3 if [ -d /etc ] 4 then 5 fun 6 fi 7 8 fun(){ 9 /bin/echo "hello" 10 }执行结果如下:[root@localhost shellScript]# sh function.sh function.sh: line 5: fun: command not found[root@localhost shellScript]# vi function.sh fun是个函数,在下面定义了,为什么还提示command not found?