function test{ echo "hello";} is not able to execute in karaf shell.
Error : Command not found: function
function test{ echo "hello";} is not able to execute in karaf shell.
Error : Command not found: function
I'm not familiar with Apache Karaf but I do know that the function
syntax that you have used is non-standard. It is supported by Bash but not all other shells.
The standard function syntax in the shell is simply:
test() { echo "hello"; }
I would suggest using it everywhere.